diff options
Diffstat (limited to 'src/Java/miscutil/core/item')
3 files changed, 101 insertions, 0 deletions
diff --git a/src/Java/miscutil/core/item/base/dusts/BaseItemDustAbstract.java b/src/Java/miscutil/core/item/base/dusts/BaseItemDustAbstract.java new file mode 100644 index 0000000000..f32ed1fbe9 --- /dev/null +++ b/src/Java/miscutil/core/item/base/dusts/BaseItemDustAbstract.java @@ -0,0 +1,41 @@ +package miscutil.core.item.base.dusts; + +import java.util.List; + +import miscutil.core.lib.CORE; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import cpw.mods.fml.common.registry.GameRegistry; + +public abstract class BaseItemDustAbstract extends Item{ + + protected int colour = 0; + protected String materialName; + protected String pileType; + + public BaseItemDustAbstract(String unlocalizedName, String materialName, int colour, String pileSize) { + this.setUnlocalizedName(unlocalizedName); + this.setMaxStackSize(64); + if (pileSize == "dust" || pileSize == "Dust"){ + this.setTextureName(CORE.MODID + ":" + "dust"); + } + else{ + this.setTextureName(CORE.MODID + ":" + "dust"+pileSize); + } + this.setMaxStackSize(64); + this.colour = colour; + this.materialName = materialName; + setUnlocalizedName(unlocalizedName); + GameRegistry.registerItem(this, unlocalizedName); + } + + @Override + public abstract void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool); + + public abstract String getMaterialName(); + + @Override + public abstract int getColorFromItemStack(ItemStack stack, int HEX_OxFFFFFF); + +} diff --git a/src/Java/miscutil/core/item/base/dusts/BaseItemDustSmall.java b/src/Java/miscutil/core/item/base/dusts/BaseItemDustSmall.java new file mode 100644 index 0000000000..2e0334887b --- /dev/null +++ b/src/Java/miscutil/core/item/base/dusts/BaseItemDustSmall.java @@ -0,0 +1,30 @@ +package miscutil.core.item.base.dusts; + +import java.util.List; + +import miscutil.core.lib.CORE; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +public class BaseItemDustSmall extends BaseItemDust{ + + protected int colour = 0; + protected String materialName; + + public BaseItemDustSmall(String unlocalizedName, String materialName, int colour, String size) { + super(unlocalizedName, materialName, colour, size); + this.setTextureName(CORE.MODID + ":" + "dustSmall"); + this.setMaxStackSize(64); + this.colour = colour; + this.materialName = materialName; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) { + list.add(EnumChatFormatting.GRAY+"A small pile of " + materialName + " dust."); + super.addInformation(stack, aPlayer, list, bool); + } + +} diff --git a/src/Java/miscutil/core/item/base/dusts/BaseItemDustTiny.java b/src/Java/miscutil/core/item/base/dusts/BaseItemDustTiny.java new file mode 100644 index 0000000000..814f79ebd7 --- /dev/null +++ b/src/Java/miscutil/core/item/base/dusts/BaseItemDustTiny.java @@ -0,0 +1,30 @@ +package miscutil.core.item.base.dusts; + +import java.util.List; + +import miscutil.core.lib.CORE; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; + +public class BaseItemDustTiny extends BaseItemDust{ + + protected int colour = 0; + protected String materialName; + + public BaseItemDustTiny(String unlocalizedName, String materialName, int colour, String size) { + super(unlocalizedName, materialName, colour, size); + this.setTextureName(CORE.MODID + ":" + "dustTiny"); + this.setMaxStackSize(64); + this.colour = colour; + this.materialName = materialName; + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + @Override + public void addInformation(ItemStack stack, EntityPlayer aPlayer, List list, boolean bool) { + list.add(EnumChatFormatting.GRAY+"A tiny pile of " + materialName + " dust."); + super.addInformation(stack, aPlayer, list, bool); + } + +} |