Improved handling of chat message packets
More improvements and fixes relating to dynamic regions and constructions
This commit is contained in:
@@ -201,7 +201,6 @@ public final class BuildingUtils {
|
||||
for (int i = 7; i >= 0; i--) {
|
||||
Item can = player.getInventory().getItem(new Item(WATERING_CAN - i, 1));
|
||||
if (can != null && can.getSlot() > -1) {
|
||||
System.out.println("Can index " + (i == 7 ? i + 2 : i + 1) + ".");
|
||||
player.getInventory().replace(new Item(WATERING_CAN - (i == 7 ? i + 2 : i + 1), 1), can.getSlot());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -396,10 +396,12 @@ public final class HouseManager {
|
||||
houseRegion = getPreparedRegion();
|
||||
configureRoofs();
|
||||
prepareHouseChunks(style, houseRegion, buildingMode, rooms);
|
||||
houseRegion.flagActive();
|
||||
|
||||
if (hasDungeon()) {
|
||||
dungeonRegion = getPreparedRegion();
|
||||
prepareDungeonChunks(style, dungeonRegion, houseRegion, buildingMode, rooms[3]);
|
||||
dungeonRegion.flagActive();
|
||||
}
|
||||
|
||||
ZoneBuilder.configure(zone);
|
||||
@@ -411,6 +413,7 @@ public final class HouseManager {
|
||||
DynamicRegion region = new DynamicRegion(-1, borders.getSouthWestX() >> 6, borders.getSouthWestY() >> 6);
|
||||
region.setBorders(borders);
|
||||
region.setUpdateAllPlanes(true);
|
||||
region.setBuild(true);
|
||||
RegionManager.addRegion(region.getId(), region);
|
||||
return region;
|
||||
}
|
||||
@@ -428,8 +431,7 @@ public final class HouseManager {
|
||||
|
||||
@Override
|
||||
public BuildRegionChunk getChunk(int x, int y, int plane, @NotNull DynamicRegion dyn) {
|
||||
BuildRegionChunk chunk = rooms[plane][x][y].getChunk().copy(dyn.getPlanes()[plane]);
|
||||
return chunk;
|
||||
return rooms[plane][x][y].getChunk().copy(dyn.getPlanes()[plane]);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user