From 75a3a91e656d310ea4050defc87b4828fb8d3fd2 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 20 Nov 2016 17:26:10 +0100 Subject: [PATCH] remove old stuff that isn't really a thing anymore --- .../actuallyadditions/mod/items/ItemDrill.java | 1 - .../mod/items/ItemPhantomConnector.java | 18 +++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java index 70e101ea3..13fe1b914 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrill.java @@ -128,7 +128,6 @@ public class ItemDrill extends ItemEnergy{ } //Notify the Player and log the Exception catch(Exception e){ - player.addChatMessage(new TextComponentString("Ouch! That really hurt! You must have done something wrong, don't do that again please!")); ModUtil.LOGGER.error("Player "+player.getName()+" who should place a Block using a Drill at "+player.posX+", "+player.posY+", "+player.posZ+" in World "+world.provider.getDimension()+" threw an Exception! Don't let that happen again!"); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java index 483537189..b1617cf69 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java @@ -94,8 +94,9 @@ public class ItemPhantomConnector extends ItemBase{ if(tile != null){ //Passing to Phantom if(tile instanceof IPhantomTile){ - if(this.checkHasConnection(stack, player, tile) && getStoredWorld(stack) == world){ - ((IPhantomTile)tile).setBoundPosition(getStoredPosition(stack)); + BlockPos stored = getStoredPosition(stack); + if(stored != null && getStoredWorld(stack) == world){ + ((IPhantomTile)tile).setBoundPosition(stored); if(tile instanceof TileEntityBase){ ((TileEntityBase)tile).sendUpdate(); } @@ -113,19 +114,6 @@ public class ItemPhantomConnector extends ItemBase{ return EnumActionResult.SUCCESS; } - public boolean checkHasConnection(ItemStack stack, EntityPlayer player, TileEntity tile){ - if(getStoredPosition(stack) != null){ - return true; - } - else{ - if(tile instanceof IPhantomTile){ - ((IPhantomTile)tile).setBoundPosition(null); - } - player.addChatMessage(new TextComponentTranslation("tooltip."+ModUtil.MOD_ID+".phantom.unbound.desc")); - return false; - } - } - @Override public boolean getShareTag(){ return true;