ALL ITEMS USE JSON NOW \o/
|
@ -55,6 +55,44 @@ public class RegisterItemJsons {
|
|||
register(ModItems.lapotronpack, "tool/lapotronic_orbpack");
|
||||
register(ModItems.lithiumBatpack, "tool/lithium_batpack");
|
||||
|
||||
registerBlockstateMultiItem(ModItems.rubyHelmet, "ruby_helmet", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.rubyChestplate, "ruby_chestplate", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.rubyLeggings, "ruby_leggings", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.rubyBoots, "ruby_boots", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.sapphireHelmet, "sapphire_helmet", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.sapphireChestplate, "sapphire_chestplate", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.sapphireLeggings, "sapphire_leggings", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.sapphireBoots, "sapphire_boots", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.peridotHelmet, "peridot_helmet", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.peridotChestplate, "peridot_chestplate", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.peridotLeggings, "peridot_leggings", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.peridotBoots, "peridot_boots", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.bronzeHelmet, "bronze_helmet", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.bronzeChestplate, "bronze_chestplate", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.bronzeLeggings, "bronze_leggings", "items/tool/armour");
|
||||
registerBlockstateMultiItem(ModItems.bronzeBoots, "bronze_boots", "items/tool/armour");
|
||||
|
||||
registerBlockstateMultiItem(ModItems.rubyPickaxe, "ruby_pickaxe", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.rubySword, "ruby_sword", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.rubyAxe, "ruby_axe", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.rubySpade, "ruby_spade", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.rubyHoe, "ruby_hoe", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.sapphirePickaxe, "sapphire_pickaxe", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.sapphireSword, "sapphire_sword", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.sapphireAxe, "sapphire_axe", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.sapphireSpade, "sapphire_spade", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.sapphireHoe, "sapphire_hoe", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.peridotPickaxe, "peridot_pickaxe", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.peridotSword, "peridot_sword", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.peridotAxe, "peridot_axe", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.peridotSpade, "peridot_spade", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.peridotHoe, "peridot_hoe", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.bronzePickaxe, "bronze_pickaxe", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.bronzeSword, "bronze_sword", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.bronzeAxe, "bronze_axe", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.bronzeSpade, "bronze_spade", "items/tool/tool");
|
||||
registerBlockstateMultiItem(ModItems.bronzeHoe, "bronze_hoe", "items/tool/tool");
|
||||
|
||||
for (int i = 0; i < ItemIngots.types.length; ++i) {
|
||||
String[] name = ItemIngots.types.clone();
|
||||
registerBlockstate(ModItems.ingots, i, name[i], "items/materials/");
|
||||
|
@ -85,6 +123,11 @@ public class RegisterItemJsons {
|
|||
registerBlockstate(ModItems.smallDusts, i, name[i], "items/materials/");
|
||||
}
|
||||
|
||||
for (int i = 0; i < ItemParts.types.length; ++i) {
|
||||
String[] name = ItemParts.types.clone();
|
||||
registerBlockstate(ModItems.parts, i, name[i], "items/materials/");
|
||||
}
|
||||
|
||||
for (int i = 0; i < ItemUpgrades.types.length; ++i) {
|
||||
String[] name = ItemUpgrades.types.clone();
|
||||
registerBlockstate(ModItems.upgrades, i, name[i], "items/misc/");
|
||||
|
@ -154,4 +197,9 @@ public class RegisterItemJsons {
|
|||
private static void registerBlockstate(Block i, int meta, String variant, String dir) {
|
||||
registerBlockstate(Item.getItemFromBlock(i), meta, variant, dir);
|
||||
}
|
||||
|
||||
private static void registerBlockstateMultiItem(Item item, String variantName, String path) {
|
||||
ResourceLocation loc = new ResourceLocation("techreborn", path);
|
||||
ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(loc, "type=" + variantName));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package techreborn.items;
|
||||
|
||||
import com.google.common.base.CaseFormat;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -10,19 +11,18 @@ import techreborn.Core;
|
|||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModItems;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
import java.security.InvalidParameterException;
|
||||
|
||||
public class ItemParts extends ItemTextureBase {
|
||||
public static final String[] types = new String[] { "energyFlowCircuit", "dataControlCircuit", "dataStorageCircuit",
|
||||
"dataOrb", "diamondGrindingHead", "diamondSawBlade", "tungstenGrindingHead", "heliumCoolantSimple",
|
||||
"heliumCoolantTriple", "heliumCoolantSix", "NaKCoolantSimple", "NaKCoolantTriple", "NaKCoolantSix",
|
||||
"cupronickelHeatingCoil", "nichromeHeatingCoil", "kanthalHeatingCoil", ModItems.META_PLACEHOLDER, "superConductor",
|
||||
"thoriumCell", "doubleThoriumCell", "quadThoriumCell", "plutoniumCell", "doublePlutoniumCell",
|
||||
"quadPlutoniumCell", "computerMonitor", "machineParts", "neutronReflector", "iridiumNeutronReflector",
|
||||
"thickNeutronReflector", "electronicCircuit", "advancedCircuit", "rubberSap", "rubber", "scrap",
|
||||
"carbonmesh", "carbonfiber", "coolantSimple", "coolantTriple", "coolantSix" };
|
||||
public class ItemParts extends ItemTRNoDestroy {
|
||||
public static final String[] types = new String[] { "energy_flow_circuit", "data_control_circuit", "data_storage_circuit",
|
||||
"data_orb", "diamond_grinding_head", "diamond_saw_blade", "tungsten_grinding_head", "helium_coolant_simple",
|
||||
"helium_coolant_triple", "helium_coolant_six", "nak_coolant_simple", "nak_coolant_triple", "nak_coolant_six",
|
||||
"cupronickel_heating_coil", "nichrome_heating_coil", "kanthal_heating_coil", ModItems.META_PLACEHOLDER, "super_conductor",
|
||||
"thorium_cell", "double_thorium_cell", "quad_thorium_cell", "plutonium_cell", "double_plutonium_cell",
|
||||
"quad_plutonium_cell", "computer_monitor", "machine_parts", "neutron_reflector", "iridium_neutron_reflector",
|
||||
"thick_neutron_reflector", "electronic_circuit", "advanced_circuit", "sap", "rubber", "scrap",
|
||||
"carbon_mesh", "carbon_fiber", "coolant_simple", "coolant_triple", "coolant_six" };
|
||||
|
||||
public ItemParts() {
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
|
@ -31,6 +31,22 @@ public class ItemParts extends ItemTextureBase {
|
|||
}
|
||||
|
||||
public static ItemStack getPartByName(String name, int count) {
|
||||
//TODO: Change all recipes n' shit to use proper snake_case names so I don't have to do this bullshit
|
||||
if (name.equals("NaKCoolantSimple"))
|
||||
name = "nak_coolant_simple";
|
||||
if (name.equals("NaKCoolantTriple"))
|
||||
name = "nak_coolant_triple";
|
||||
if (name.equals("NaKCoolantSix"))
|
||||
name = "nak_coolant_six";
|
||||
if (name.equals("superconductor"))
|
||||
name = "super_conductor";
|
||||
if (name.equals("carbonfiber"))
|
||||
name = "carbon_fiber";
|
||||
if (name.equals("carbonmesh"))
|
||||
name = "carbon_mesh";
|
||||
if (name.equals("rubberSap"))
|
||||
name = "sap";
|
||||
name = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, name);
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equalsIgnoreCase(name)) {
|
||||
return new ItemStack(ModItems.parts, count, i);
|
||||
|
@ -72,14 +88,4 @@ public class ItemParts extends ItemTextureBase {
|
|||
}
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage) {
|
||||
return ModInfo.MOD_ID + ":items/part/" + types[damage].toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta() {
|
||||
return types.length;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@ public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo {
|
|||
setMaxStackSize(1);
|
||||
setUnlocalizedName("techreborn.lithiumbatpack");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,21 +1,13 @@
|
|||
package techreborn.items.armor;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
/**
|
||||
* Created by modmuss50 on 26/02/2016.
|
||||
*/
|
||||
public class ItemTRArmour extends ItemArmor implements ITexturedItem {
|
||||
public class ItemTRArmour extends ItemArmor {
|
||||
|
||||
private ArmorMaterial material = ArmorMaterial.LEATHER;
|
||||
private EntityEquipmentSlot slot = EntityEquipmentSlot.HEAD;
|
||||
|
@ -31,37 +23,7 @@ public class ItemTRArmour extends ItemArmor implements ITexturedItem {
|
|||
if (slot == EntityEquipmentSlot.FEET)
|
||||
setUnlocalizedName(material.name().toLowerCase() + "Boots");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material = material;
|
||||
this.slot = slot;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage) {
|
||||
if (slot == EntityEquipmentSlot.HEAD)
|
||||
return "techreborn:items/tool/" + material.name().toLowerCase() + "_helmet";
|
||||
if (slot == EntityEquipmentSlot.CHEST)
|
||||
return "techreborn:items/tool/" + material.name().toLowerCase() + "_chestplate";
|
||||
if (slot == EntityEquipmentSlot.LEGS)
|
||||
return "techreborn:items/tool/" + material.name().toLowerCase() + "_leggings";
|
||||
if (slot == EntityEquipmentSlot.FEET)
|
||||
return "techreborn:items/tool/" + material.name().toLowerCase() + "_boots";
|
||||
return "techreborn:items/tool/" + material.name().toLowerCase() + "_error";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) {
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,30 +1,22 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import me.modmuss50.jsonDestroyer.api.IHandHeld;
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemTool;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public class ItemTRAxe extends ItemTool implements ITexturedItem, IHandHeld {
|
||||
private ToolMaterial material = ToolMaterial.WOOD;
|
||||
|
||||
public class ItemTRAxe extends ItemTool {
|
||||
private static final Set<Block> EFFECTIVE_ON = Sets.newHashSet(new Block[] { Blocks.PLANKS, Blocks.BOOKSHELF,
|
||||
Blocks.LOG, Blocks.LOG2, Blocks.CHEST, Blocks.PUMPKIN, Blocks.LIT_PUMPKIN, Blocks.MELON_BLOCK,
|
||||
Blocks.LADDER, Blocks.WOODEN_BUTTON, Blocks.WOODEN_PRESSURE_PLATE });
|
||||
private ToolMaterial material = ToolMaterial.WOOD;
|
||||
|
||||
public ItemTRAxe(ToolMaterial material) {
|
||||
super(material, EFFECTIVE_ON);
|
||||
|
@ -32,7 +24,6 @@ public class ItemTRAxe extends ItemTool implements ITexturedItem, IHandHeld {
|
|||
this.attackSpeed = (material.getDamageVsEntity() + 6.75F) * -0.344444F;
|
||||
setUnlocalizedName(material.name().toLowerCase() + "Axe");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material = material;
|
||||
}
|
||||
|
||||
|
@ -41,25 +32,4 @@ public class ItemTRAxe extends ItemTool implements ITexturedItem, IHandHeld {
|
|||
return material != Material.WOOD && material != Material.PLANTS && material != Material.VINE
|
||||
? super.getStrVsBlock(stack, state) : this.efficiencyOnProperMaterial;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage) {
|
||||
return "techreborn:items/tool/" + material.name().toLowerCase() + "_axe";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) {
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,44 +1,21 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.IHandHeld;
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemTRHoe extends ItemHoe implements ITexturedItem, IHandHeld {
|
||||
public class ItemTRHoe extends ItemHoe {
|
||||
private ToolMaterial material = ToolMaterial.WOOD;
|
||||
|
||||
public ItemTRHoe(ToolMaterial material) {
|
||||
super(material);
|
||||
setUnlocalizedName(material.name().toLowerCase() + "Hoe");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material = material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage) {
|
||||
return "techreborn:items/tool/" + material.name().toLowerCase() + "_hoe";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) {
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
|
|
|
@ -1,46 +1,16 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.IHandHeld;
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemTRPickaxe extends ItemPickaxe implements ITexturedItem, IHandHeld {
|
||||
public class ItemTRPickaxe extends ItemPickaxe {
|
||||
private ToolMaterial material = ToolMaterial.WOOD;
|
||||
|
||||
public ItemTRPickaxe(ToolMaterial material) {
|
||||
super(material);
|
||||
setUnlocalizedName(material.name().toLowerCase() + "Pickaxe");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material = material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage) {
|
||||
return "techreborn:items/tool/" + material.name().toLowerCase() + "_pickaxe";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) {
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,46 +1,16 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.IHandHeld;
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemTRSpade extends ItemSpade implements ITexturedItem, IHandHeld {
|
||||
public class ItemTRSpade extends ItemSpade {
|
||||
private ToolMaterial material = ToolMaterial.WOOD;
|
||||
|
||||
public ItemTRSpade(ToolMaterial material) {
|
||||
super(material);
|
||||
setUnlocalizedName(material.name().toLowerCase() + "Spade");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material = material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage) {
|
||||
return "techreborn:items/tool/" + material.name().toLowerCase() + "_shovel";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) {
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,46 +1,16 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.IHandHeld;
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.RebornCore;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemTRSword extends ItemSword implements ITexturedItem, IHandHeld {
|
||||
public class ItemTRSword extends ItemSword {
|
||||
private ToolMaterial material = ToolMaterial.WOOD;
|
||||
|
||||
public ItemTRSword(ToolMaterial material) {
|
||||
super(material);
|
||||
setUnlocalizedName(material.name().toLowerCase() + "Sword");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
RebornCore.jsonDestroyer.registerObject(this);
|
||||
this.material = material;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureName(int damage) {
|
||||
return "techreborn:items/tool/" + material.name().toLowerCase() + "_sword";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxMeta() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(ItemStack stack, EntityPlayer player, int useRemaining) {
|
||||
return new ModelResourceLocation(ModInfo.MOD_ID + ":" + getUnlocalizedName(stack).substring(5), "inventory");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,201 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "builtin/generated",
|
||||
"transform": "forge:default-item"
|
||||
},
|
||||
"variants": {
|
||||
"type": {
|
||||
"energy_flow_circuit": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/energy_flow_circuit"
|
||||
}
|
||||
},
|
||||
"data_control_circuit": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/data_control_circuit"
|
||||
}
|
||||
},
|
||||
"data_storage_circuit": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/data_storage_circuit"
|
||||
}
|
||||
},
|
||||
"data_orb": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/data_orb"
|
||||
}
|
||||
},
|
||||
"diamond_grinding_head": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/diamond_grinding_head"
|
||||
}
|
||||
},
|
||||
"diamond_saw_blade": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/diamond_saw_blade"
|
||||
}
|
||||
},
|
||||
"tungsten_grinding_head": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/tungsten_grinding_head"
|
||||
}
|
||||
},
|
||||
"helium_coolant_simple": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/helium_coolant_simple"
|
||||
}
|
||||
},
|
||||
"helium_coolant_triple": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/helium_coolant_triple"
|
||||
}
|
||||
},
|
||||
"helium_coolant_six": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/helium_coolant_six"
|
||||
}
|
||||
},
|
||||
"nak_coolant_simple": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/nak_coolant_simple"
|
||||
}
|
||||
},
|
||||
"nak_coolant_triple": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/nak_coolant_triple"
|
||||
}
|
||||
},
|
||||
"nak_coolant_six": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/nak_coolant_six"
|
||||
}
|
||||
},
|
||||
"cupronickel_heating_coil": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/cupronickel_heating_coil"
|
||||
}
|
||||
},
|
||||
"nichrome_heating_coil": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/nichrome_heating_coil"
|
||||
}
|
||||
},
|
||||
"kanthal_heating_coil": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/kanthal_heating_coil"
|
||||
}
|
||||
},
|
||||
"super_conductor": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/super_conductor"
|
||||
}
|
||||
},
|
||||
"thorium_cell": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/thorium_cell"
|
||||
}
|
||||
},
|
||||
"double_thorium_cell": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/double_thorium_cell"
|
||||
}
|
||||
},
|
||||
"quad_thorium_cell": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/quad_thorium_cell"
|
||||
}
|
||||
},
|
||||
"plutonium_cell": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/plutonium_cell"
|
||||
}
|
||||
},
|
||||
"double_plutonium_cell": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/double_plutonium_cell"
|
||||
}
|
||||
},
|
||||
"quad_plutonium_cell": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/quad_plutonium_cell"
|
||||
}
|
||||
},
|
||||
"computer_monitor": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/computer_monitor"
|
||||
}
|
||||
},
|
||||
"machine_parts": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/machine_parts"
|
||||
}
|
||||
},
|
||||
"neutron_reflector": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/neutron_reflector"
|
||||
}
|
||||
},
|
||||
"iridium_neutron_reflector": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/iridium_neutron_reflector"
|
||||
}
|
||||
},
|
||||
"thick_neutron_reflector": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/thick_neutron_reflector"
|
||||
}
|
||||
},
|
||||
"electronic_circuit": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/electronic_circuit"
|
||||
}
|
||||
},
|
||||
"advanced_circuit": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/advanced_circuit"
|
||||
}
|
||||
},
|
||||
"sap": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/sap"
|
||||
}
|
||||
},
|
||||
"rubber": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/rubber"
|
||||
}
|
||||
},
|
||||
"scrap": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/scrap"
|
||||
}
|
||||
},
|
||||
"carbon_mesh": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/carbon_mesh"
|
||||
}
|
||||
},
|
||||
"carbon_fiber": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/carbon_fiber"
|
||||
}
|
||||
},
|
||||
"coolant_simple": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/coolant_simple"
|
||||
}
|
||||
},
|
||||
"coolant_triple": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/coolant_triple"
|
||||
}
|
||||
},
|
||||
"coolant_six": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/part/coolant_six"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "builtin/generated",
|
||||
"transform": "forge:default-item"
|
||||
},
|
||||
"variants": {
|
||||
"type": {
|
||||
"ruby_helmet": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/ruby_helmet"
|
||||
}
|
||||
},
|
||||
"ruby_chestplate": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/ruby_chestplate"
|
||||
}
|
||||
},
|
||||
"ruby_leggings": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/ruby_leggings"
|
||||
}
|
||||
},
|
||||
"ruby_boots": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/ruby_boots"
|
||||
}
|
||||
},
|
||||
"sapphire_helmet": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/sapphire_helmet"
|
||||
}
|
||||
},
|
||||
"sapphire_chestplate": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/sapphire_chestplate"
|
||||
}
|
||||
},
|
||||
"sapphire_leggings": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/sapphire_leggings"
|
||||
}
|
||||
},
|
||||
"sapphire_boots": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/sapphire_boots"
|
||||
}
|
||||
},
|
||||
"peridot_helmet": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/peridot_helmet"
|
||||
}
|
||||
},
|
||||
"peridot_chestplate": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/peridot_chestplate"
|
||||
}
|
||||
},
|
||||
"peridot_leggings": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/peridot_leggings"
|
||||
}
|
||||
},
|
||||
"peridot_boots": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/peridot_boots"
|
||||
}
|
||||
},
|
||||
"bronze_helmet": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/bronze_helmet"
|
||||
}
|
||||
},
|
||||
"bronze_chestplate": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/bronze_chestplate"
|
||||
}
|
||||
},
|
||||
"bronze_leggings": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/bronze_leggings"
|
||||
}
|
||||
},
|
||||
"bronze_boots": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/bronze_boots"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "builtin/generated",
|
||||
"transform": "forge:default-item"
|
||||
},
|
||||
"variants": {
|
||||
"type": {
|
||||
"ruby_pickaxe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/ruby_pickaxe"
|
||||
}
|
||||
},
|
||||
"ruby_sword": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/ruby_sword"
|
||||
}
|
||||
},
|
||||
"ruby_axe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/ruby_axe"
|
||||
}
|
||||
},
|
||||
"ruby_spade": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/ruby_spade"
|
||||
}
|
||||
},
|
||||
"ruby_hoe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/ruby_hoe"
|
||||
}
|
||||
},
|
||||
"sapphire_pickaxe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/sapphire_pickaxe"
|
||||
}
|
||||
},
|
||||
"sapphire_sword": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/sapphire_sword"
|
||||
}
|
||||
},
|
||||
"sapphire_axe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/sapphire_axe"
|
||||
}
|
||||
},
|
||||
"sapphire_spade": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/sapphire_spade"
|
||||
}
|
||||
},
|
||||
"sapphire_hoe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/sapphire_hoe"
|
||||
}
|
||||
},
|
||||
"peridot_pickaxe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/peridot_pickaxe"
|
||||
}
|
||||
},
|
||||
"peridot_sword": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/peridot_sword"
|
||||
}
|
||||
},
|
||||
"peridot_axe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/peridot_axe"
|
||||
}
|
||||
},
|
||||
"peridot_spade": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/peridot_spade"
|
||||
}
|
||||
},
|
||||
"peridot_hoe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/peridot_hoe"
|
||||
}
|
||||
},
|
||||
"bronze_pickaxe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/bronze_pickaxe"
|
||||
}
|
||||
},
|
||||
"bronze_sword": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/bronze_sword"
|
||||
}
|
||||
},
|
||||
"bronze_axe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/bronze_axe"
|
||||
}
|
||||
},
|
||||
"bronze_spade": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/bronze_spade"
|
||||
}
|
||||
},
|
||||
"bronze_hoe": {
|
||||
"textures": {
|
||||
"layer0": "techreborn:items/tool/bronze_hoe"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 769 B After Width: | Height: | Size: 769 B |
Before Width: | Height: | Size: 688 B After Width: | Height: | Size: 688 B |
Before Width: | Height: | Size: 629 B After Width: | Height: | Size: 629 B |
Before Width: | Height: | Size: 815 B After Width: | Height: | Size: 815 B |
Before Width: | Height: | Size: 659 B After Width: | Height: | Size: 659 B |
Before Width: | Height: | Size: 823 B After Width: | Height: | Size: 823 B |
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 627 B |
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 526 B |
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 549 B After Width: | Height: | Size: 549 B |
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 436 B |
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 340 B |
Before Width: | Height: | Size: 846 B After Width: | Height: | Size: 846 B |
Before Width: | Height: | Size: 898 B After Width: | Height: | Size: 898 B |
Before Width: | Height: | Size: 473 B After Width: | Height: | Size: 473 B |
Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 464 B |
Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 477 B After Width: | Height: | Size: 477 B |
Before Width: | Height: | Size: 754 B After Width: | Height: | Size: 754 B |
Before Width: | Height: | Size: 755 B After Width: | Height: | Size: 755 B |
Before Width: | Height: | Size: 664 B After Width: | Height: | Size: 664 B |
Before Width: | Height: | Size: 832 B After Width: | Height: | Size: 832 B |
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 643 B |
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 717 B |
Before Width: | Height: | Size: 518 B After Width: | Height: | Size: 518 B |
Before Width: | Height: | Size: 757 B After Width: | Height: | Size: 757 B |
Before Width: | Height: | Size: 664 B After Width: | Height: | Size: 664 B |
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 826 B |
Before Width: | Height: | Size: 634 B After Width: | Height: | Size: 634 B |
Before Width: | Height: | Size: 564 B After Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 521 B After Width: | Height: | Size: 521 B |
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 347 B |
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 605 B |
Before Width: | Height: | Size: 590 B After Width: | Height: | Size: 590 B |
Before Width: | Height: | Size: 606 B After Width: | Height: | Size: 606 B |
Before Width: | Height: | Size: 541 B After Width: | Height: | Size: 541 B |
Before Width: | Height: | Size: 424 B After Width: | Height: | Size: 424 B |
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 839 B After Width: | Height: | Size: 839 B |
Before Width: | Height: | Size: 346 B After Width: | Height: | Size: 346 B |
Before Width: | Height: | Size: 439 B After Width: | Height: | Size: 439 B |
Before Width: | Height: | Size: 536 B After Width: | Height: | Size: 536 B |
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 535 B |
Before Width: | Height: | Size: 530 B After Width: | Height: | Size: 530 B |