Fix items not placing at correct height - Closes #474 and #475

This commit is contained in:
Beny 2020-10-15 08:57:12 +02:00
parent 1afdf134cc
commit 0d9d4eda61

View File

@ -4498,6 +4498,13 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
double height = tile.getStackHeight();
for(RoomTile tile2 : occupiedTiles) {
double sHeight = tile2.getStackHeight();
if(sHeight > height) {
height = sHeight;
}
}
if (Emulator.getPluginManager().isRegistered(FurnitureBuildheightEvent.class, true)) {
FurnitureBuildheightEvent event = Emulator.getPluginManager().fireEvent(new FurnitureBuildheightEvent(item, owner, 0.00, height));
if (event.hasChangedHeight()) {