diff options
author | Jordan Byrne <draknyte1@hotmail.com> | 2018-02-19 17:06:10 +1000 |
---|---|---|
committer | Jordan Byrne <draknyte1@hotmail.com> | 2018-02-19 17:06:10 +1000 |
commit | b87b64a28c9e0b8520a1447c7f1996a6ff71acc2 (patch) | |
tree | fc2204b2a8b881a33b20d2311038d3d777bb8523 /src/Java/gtPlusPlus/core/item | |
parent | 941add7ddac9c6db5dce5d05507b5ed69893f9fc (diff) | |
download | GT5-Unofficial-b87b64a28c9e0b8520a1447c7f1996a6ff71acc2.tar.gz GT5-Unofficial-b87b64a28c9e0b8520a1447c7f1996a6ff71acc2.tar.bz2 GT5-Unofficial-b87b64a28c9e0b8520a1447c7f1996a6ff71acc2.zip |
$ Tree farmer work.
+ Things.
Diffstat (limited to 'src/Java/gtPlusPlus/core/item')
-rw-r--r-- | src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java index 4ac7c7f5ff..aed0145303 100644 --- a/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java +++ b/src/Java/gtPlusPlus/core/item/base/itemblock/ItemBlockNBT.java @@ -1,6 +1,9 @@ package gtPlusPlus.core.item.base.itemblock; +import java.util.List; + import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.interfaces.ITileTooltip; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.tileentities.base.TileEntityBase; import gtPlusPlus.core.util.player.PlayerUtils; @@ -15,10 +18,29 @@ import net.minecraft.world.World; public class ItemBlockNBT extends ItemBlock { + + protected final int mID; + public ItemBlockNBT(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 () + + + + if (this.mID == 0){ //blockDarkWorldPortalFrame + list.add("Assembled in the same shape as the Nether Portal."); + } } + + @Override public void onCreated(ItemStack item, World world, EntityPlayer player) { addNBT(player, item); @@ -59,17 +81,13 @@ public class ItemBlockNBT extends ItemBlock { @Override public boolean placeBlockAt(ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int side, float hitX, float hitY, float hitZ, int aMeta) { - - - if (!(aWorld.setBlock(aX, aY, aZ, this.field_150939_a, 0, 3))) { return false; } if (aWorld.getBlock(aX, aY, aZ) == this.field_150939_a) { this.field_150939_a.onBlockPlacedBy(aWorld, aX, aY, aZ, aPlayer, aStack); this.field_150939_a.onPostBlockPlaced(aWorld, aX, aY, aZ, aMeta); - } - + } TileEntityBase tTileEntity = (TileEntityBase) aWorld.getTileEntity(aX, aY, aZ); if (tTileEntity != null && aPlayer != null) { if (tTileEntity.isServerSide()){ @@ -78,7 +96,6 @@ public class ItemBlockNBT extends ItemBlock { tTileEntity.setOwnerInformation(aNBT.getString("mOwner"), aNBT.getString("mUUID"), aNBT.getBoolean("mOP")); } } - return true; } |