This commit is contained in:
Alejandro 2020-01-28 13:51:55 +02:00
parent 2ee6332aed
commit 8c4a44e3e7

View File

@ -60,6 +60,8 @@ public class InteractionPuzzleBox extends HabboItem {
return;
}
super.onClick(client, room, new Object[]{"TOGGLE_OVERRIDE"});
RoomTile tile = room.getLayout().getTileInFront(room.getLayout().getTile(this.getX(), this.getY()), rotation.getValue());
if (tile == null || tile.getState() == RoomTileState.INVALID || room.hasHabbosAt(tile.x, tile.y)) {
@ -80,8 +82,6 @@ public class InteractionPuzzleBox extends HabboItem {
room.scheduledComposers.add(new FloorItemOnRollerComposer(this, null, tile, 0, room).compose());
room.scheduledTasks.add(() -> client.getHabbo().getRoomUnit().setGoalLocation(boxLocation));
this.needsUpdate(true);
super.onClick(client, room, new Object[]{"TOGGLE_OVERRIDE"});
}
@Override