From f357e3a1753c7c542d48bb217d8a2545cb9544c4 Mon Sep 17 00:00:00 2001 From: Jordan Byrne Date: Mon, 8 Jan 2018 19:58:35 +1000 Subject: + Added an interface to make tooltips on tile entities more flexible. + Actually added the recipe for the Mining Explosives this time. + Attempted to add a framework for packet handling. --- .../item/base/itemblock/ItemBlockBasicTile.java | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java (limited to 'src/Java/gtPlusPlus/core/item') diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java new file mode 100644 index 0000000000..35be477618 --- /dev/null +++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockBasicTile.java @@ -0,0 +1,38 @@ +package gtPlusPlus.core.item.base.itemblock; + +import java.util.List; + +import gtPlusPlus.api.interfaces.ITileTooltip; +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; + +public class ItemBlockBasicTile extends ItemBlock{ + + private final int mID; + + public ItemBlockBasicTile(final Block block) { + super(block); + this.mID = ((ITileTooltip) block).getTooltipID(); + } + + @Override + public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) { + if (this.mID == 0){ //Fishtrap + list.add("This trap catches fish faster if surrounded by more water blocks."); + } + else if (this.mID == 1){ //Modularity + list.add("Used to construct modular armour & bauble upgrades.."); + } + else if (this.mID == 2){ //Trade + list.add("Allows for SMP trade-o-mat type trading."); + } + else if (this.mID == 3){ //Project + list.add("Scan any crafting recipe in this to mass fabricate them in the Autocrafter.."); + } + //super.addInformation(stack, aPlayer, list, bool); + } + + +} -- cgit