ALL ITEMS USE JSON NOW \o/
This commit is contained in:
parent
0273a619f1
commit
764396d7ef
58 changed files with 484 additions and 209 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue