Remove some crap
This commit is contained in:
parent
3e99b11291
commit
d1ca1eaa74
11 changed files with 25 additions and 159 deletions
|
@ -1,77 +0,0 @@
|
|||
package techreborn.items;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemCrushedOre extends ItemTextureBase
|
||||
{
|
||||
public static final String[] types = new String[] { "Aluminum", "Ardite", "Bauxite", "Cadmium", "Cinnabar",
|
||||
"Cobalt", "DarkIron", "Indium", "Iridium", "Nickel", "Osmium", "Platinum", "Pyrite", "Sphalerite",
|
||||
"Tetrahedrite", "Tungsten", "Galena" };
|
||||
|
||||
public ItemCrushedOre()
|
||||
{
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHasSubtypes(true);
|
||||
setUnlocalizedName("techreborn.crushedore");
|
||||
}
|
||||
|
||||
public static ItemStack getCrushedOreByName(String name, int count)
|
||||
{
|
||||
for (int i = 0; i < types.length; i++)
|
||||
{
|
||||
if (types[i].equalsIgnoreCase(name))
|
||||
{
|
||||
return new ItemStack(ModItems.crushedOre, count, i);
|
||||
}
|
||||
}
|
||||
throw new InvalidParameterException("The gem " + name + " could not be found.");
|
||||
}
|
||||
|
||||
public static ItemStack getCrushedOreByName(String name)
|
||||
{
|
||||
return getCrushedOreByName(name, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
int meta = itemStack.getItemDamage();
|
||||
if (meta < 0 || meta >= types.length)
|
||||
{
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return super.getUnlocalizedName() + "." + types[meta];
|
||||
}
|
||||
|
||||
// Adds Dusts SubItems To Creative Tab
|
||||
public void getSubItems(Item item, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int meta = 0; meta < types.length; ++meta)
|
||||
{
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage)
|
||||
{
|
||||
return ModInfo.MOD_ID + ":items/crushedOre/crushed" + types[damage] + "Ore";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta()
|
||||
{
|
||||
return types.length;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,22 +1,17 @@
|
|||
package techreborn.items;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.api.ScrapboxList;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
|
||||
public class ItemFrequencyTransmitter extends ItemTextureBase implements ITexturedItem
|
||||
{
|
||||
public class ItemFrequencyTransmitter extends ItemTextureBase implements ITexturedItem {
|
||||
|
||||
public ItemFrequencyTransmitter()
|
||||
{
|
||||
public ItemFrequencyTransmitter() {
|
||||
setUnlocalizedName("techreborn.frequencyTransmitter");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
|
@ -24,35 +19,17 @@ public class ItemFrequencyTransmitter extends ItemTextureBase implements ITextur
|
|||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStack, World world, EntityPlayer player,
|
||||
EnumHand hand)
|
||||
{
|
||||
if (!world.isRemote)
|
||||
{
|
||||
int random = world.rand.nextInt(ScrapboxList.stacks.size());
|
||||
ItemStack out = ScrapboxList.stacks.get(random).copy();
|
||||
float xOffset = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float yOffset = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
float zOffset = world.rand.nextFloat() * 0.8F + 0.1F;
|
||||
EntityItem entityitem = new EntityItem(world, player.getPosition().getX() + xOffset,
|
||||
player.getPosition().getY() + yOffset, player.getPosition().getZ() + zOffset, out);
|
||||
|
||||
entityitem.setPickupDelay(20);
|
||||
world.spawnEntityInWorld(entityitem);
|
||||
|
||||
itemStack.stackSize--;
|
||||
}
|
||||
return new ActionResult<>(EnumActionResult.SUCCESS, itemStack);
|
||||
EnumHand hand) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta()
|
||||
{
|
||||
public int getMaxMeta() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int arg0)
|
||||
{
|
||||
public String getTextureName(int arg0) {
|
||||
return "techreborn:items/misc/frequency_transmitter";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,17 +15,15 @@ import techreborn.init.ModItems;
|
|||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemParts extends ItemTextureBase {
|
||||
public static final String[] types = new String[] { "advancedCircuitParts", "basicCircuitBoard",
|
||||
"advancedCircuitBoard", "processorCircuitBoard", "energyFlowCircuit", "dataControlCircuit", "dataOrb",
|
||||
"dataStorageCircuit", "diamondGrindingHead", "diamondSawBlade", "tungstenGrindingHead",
|
||||
"heliumCoolantSimple", "HeliumCoolantTriple", "HeliumCoolantSix", "NaKCoolantSimple", "NaKCoolantTriple",
|
||||
"NaKCoolantSix", "cupronickelHeatingCoil", "nichromeHeatingCoil", "kanthalHeatingCoil", "laserFocus",
|
||||
"ductTape", "lazuriteChunk", "iridiumAlloyIngot", "rockCutterBlade", "superConductor", "thoriumCell",
|
||||
"doubleThoriumCell", "quadThoriumCell", "plutoniumCell", "doublePlutoniumCell", "quadPlutoniumCell",
|
||||
"destructoPack", "iridiumNeutronReflector", "massHoleDevice", "computerMonitor", "machineParts",
|
||||
"thickNeutronReflector", "neutronReflector", "electronicCircuit", "advancedCircuit", "rubberSap", "rubber",
|
||||
"scrap", "pump", "teleporter", "advancedAlloy", "mixedmetalingot", "carbonmesh", "carbonfiber", "dogecoin",
|
||||
"CoolantSimple", "CoolantTriple", "CoolantSix" };
|
||||
public static final String[] types = new String[] { "dataControlCircuit", "dataOrb", "diamondGrindingHead",
|
||||
"diamondSawBlade", "wolframiumGrindingHead", "heliumCoolantSimple", "heliumCoolantTriple",
|
||||
"heliumCoolantSix", "NaKCoolantSimple", "NaKCoolantTriple", "NaKCoolantSix", "cupronickelHeatingCoil",
|
||||
"nichromeHeatingCoil", "kanthalHeatingCoil", "lazuriteChunk", "iridiumAlloyIngot", "rockCutterBlade",
|
||||
"superConductor", "thoriumCell", "doubleThoriumCell", "quadThoriumCell", "plutoniumCell",
|
||||
"doublePlutoniumCell", "quadPlutoniumCell", "computerMonitor", "machineParts", "neutronReflector",
|
||||
"iridiumNeutronReflector", "thickNeutronReflector", "electronicCircuit", "advancedCircuit", "rubberSap",
|
||||
"rubber", "scrap", "advancedAlloy", "mixedmetalingot", "carbonmesh", "carbonfiber", "coolantSimple",
|
||||
"coolantTriple", "coolantSix" };
|
||||
|
||||
public ItemParts() {
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package techreborn.items;
|
||||
package techreborn.items.battery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -10,6 +10,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
import reborncore.api.power.IEnergyItemInfo;
|
||||
import reborncore.common.powerSystem.PoweredItem;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.items.ItemTextureBase;
|
||||
|
||||
public class ItemBattery extends ItemTextureBase implements IEnergyItemInfo
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
package techreborn.items;
|
||||
package techreborn.items.battery;
|
||||
|
||||
public class ItemEnergyCrystal extends ItemBattery {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package techreborn.items;
|
||||
package techreborn.items.battery;
|
||||
|
||||
public class ItemLapotronCrystal extends ItemBattery {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package techreborn.items;
|
||||
package techreborn.items.battery;
|
||||
|
||||
public class ItemLithiumBattery extends ItemBattery {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package techreborn.items;
|
||||
package techreborn.items.battery;
|
||||
|
||||
public class ItemReBattery extends ItemBattery {
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue