Fixes #221 and hides the multiblock when the world is closed.
This commit is contained in:
parent
cc49f03ee5
commit
65d20ec431
3 changed files with 64 additions and 0 deletions
|
@ -12,6 +12,7 @@ public class Location implements Comparable<Location> {
|
|||
public int y;
|
||||
public int z;
|
||||
public int depth;
|
||||
public World world;
|
||||
|
||||
public Location(int x, int y, int z) {
|
||||
this.x = x;
|
||||
|
@ -26,6 +27,21 @@ public class Location implements Comparable<Location> {
|
|||
this.depth = depth;
|
||||
}
|
||||
|
||||
public Location(int x, int y, int z, int depth, World world) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.depth = depth;
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
public Location(int x, int y, int z, World world) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
public Location(int xCoord, int yCoord, int zCoord, ForgeDirection dir) {
|
||||
this.x = xCoord + dir.offsetX;
|
||||
this.y = yCoord + dir.offsetY;
|
||||
|
@ -253,4 +269,23 @@ public class Location implements Comparable<Location> {
|
|||
public int compareTo(Location o) {
|
||||
return ((Integer) depth).compareTo(o.depth);
|
||||
}
|
||||
|
||||
public World getWorld() {
|
||||
return world;
|
||||
}
|
||||
|
||||
public void setWorld(World world) {
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Location{" +
|
||||
"x=" + x +
|
||||
", y=" + y +
|
||||
", z=" + z +
|
||||
", depth=" + depth +
|
||||
", world=" + world +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue