Teleport2 and readd null checks on tools
This commit is contained in:
parent
cc89c94527
commit
c09ebb9e9b
4 changed files with 8 additions and 13 deletions
|
@ -293,16 +293,11 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
|
|||
tEntity.riddenByEntity.mountEntity(null);
|
||||
}
|
||||
if ((this.mTargetD == getBaseMetaTileEntity().getWorld().provider.dimensionId) || (!isDimensionalTeleportAvailable()) || (!GT_Utility.moveEntityToDimensionAtCoords(tEntity, this.mTargetD, this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D))) {
|
||||
// System.out.println("tele");
|
||||
//// System.out.println("tdim: "+mTargetD+" proDim: "+getBaseMetaTileEntity().getWorld().provider.dimensionId);
|
||||
// if ((tEntity instanceof EntityLivingBase)) {
|
||||
// if(this.mTargetD != getBaseMetaTileEntity().getWorld().provider.dimensionId){
|
||||
// System.out.println("move dim");
|
||||
// GT_Utility.moveEntityToDimensionAtCoords(tEntity, mTargetD, mTargetX, mTargetY, mTargetZ);
|
||||
// }else{((EntityLivingBase) tEntity).setPositionAndUpdate(this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D);}
|
||||
// } else {
|
||||
// tEntity.setPosition(this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D);
|
||||
// }
|
||||
if ((tEntity instanceof EntityLivingBase)) {
|
||||
((EntityLivingBase) tEntity).setPositionAndUpdate(this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D);
|
||||
} else {
|
||||
tEntity.setPosition(this.mTargetX + 0.5D, this.mTargetY + 0.5D, this.mTargetZ + 0.5D);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class GT_Tool_File
|
|||
|
||||
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
|
||||
String tTool = aBlock.getHarvestTool(aMetaData);
|
||||
return (tTool != null) && (tTool.equals("file"));
|
||||
return ((tTool != null) && tTool.equals("file"));
|
||||
}
|
||||
|
||||
public ItemStack getBrokenItem(ItemStack aStack) {
|
||||
|
|
|
@ -43,7 +43,7 @@ public class GT_Tool_Plunger
|
|||
|
||||
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
|
||||
String tTool = aBlock.getHarvestTool(aMetaData);
|
||||
return (tTool != null) && (tTool.equals("plunger"));
|
||||
return ((tTool != null) && tTool.equals("plunger"));
|
||||
}
|
||||
|
||||
public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
|
||||
|
|
|
@ -84,7 +84,7 @@ public class GT_Tool_SoftHammer
|
|||
|
||||
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
|
||||
String tTool = aBlock.getHarvestTool(aMetaData);
|
||||
return (tTool != null) && (tTool.equals("softhammer"));
|
||||
return ((tTool != null) && tTool.equals("softhammer"));
|
||||
}
|
||||
|
||||
public ItemStack getBrokenItem(ItemStack aStack) {
|
||||
|
|
Loading…
Reference in a new issue