Fixed a Derpup.

This commit is contained in:
Ellpeck 2015-07-07 11:56:38 +02:00
parent ff5f49c99c
commit 4cf3797058
5 changed files with 4 additions and 8 deletions

View file

@ -53,7 +53,7 @@ public class ItemLeafBlower extends Item implements INameableItem{
for(int reachY = (this.isAdvanced ? -range : -rangeUp); reachY < (this.isAdvanced ? range+1 : rangeUp+1); reachY++){
Block block = world.getBlock(x+reachX, y+reachY, z+reachZ);
if(block != null && (block instanceof BlockBush || (this.isAdvanced && block instanceof BlockLeavesBase))){
WorldPos theCoord = new WorldPos(x+reachX, y+reachY, z+reachZ);
WorldPos theCoord = new WorldPos(world, x+reachX, y+reachY, z+reachZ);
Block theBlock = world.getBlock(theCoord.getX(), theCoord.getY(), theCoord.getZ());
ArrayList<ItemStack> drops = new ArrayList<ItemStack>();
int meta = world.getBlockMetadata(theCoord.getX(), theCoord.getY(), theCoord.getZ());

View file

@ -98,7 +98,7 @@ public class ItemPhantomConnector extends Item implements INameableItem{
int z = tag.getInteger("ZCoordOfTileStored");
World world = DimensionManager.getWorld(tag.getInteger("WorldOfTileStored"));
if(x != 0 && y != 0 && z != 0 && world != null){
return new WorldPos(x, y, z);
return new WorldPos(world, x, y, z);
}
}
return null;

View file

@ -38,7 +38,7 @@ public class TileEntityGreenhouseGlass extends TileEntityBase{
Block block = worldObj.getBlock(xCoord, i, zCoord);
if(block != null && !(worldObj.isAirBlock(xCoord, i, zCoord))){
if(block instanceof IGrowable && !(block instanceof BlockGrass)){
return new WorldPos(xCoord, i, zCoord);
return new WorldPos(worldObj, xCoord, i, zCoord);
}
else return null;
}

View file

@ -16,10 +16,6 @@ public class WorldPos{
this.z = z;
}
public WorldPos(int x, int y, int z){
this(null, x, y, z);
}
public int getX(){
return this.x;
}

View file

@ -21,7 +21,7 @@ public class WorldUtil{
public static WorldPos getCoordsFromSide(ForgeDirection side, int x, int y, int z){
if(side == ForgeDirection.UNKNOWN) return null;
return new WorldPos(x+side.offsetX, y+side.offsetY, z+side.offsetZ);
return new WorldPos(null, x+side.offsetX, y+side.offsetY, z+side.offsetZ);
}
public static void breakBlockAtSide(ForgeDirection side, World world, int x, int y, int z){