From 1cfbac1cfba4a414ae312ffafe40288c45ea782c Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Mon, 27 Jan 2020 15:36:08 +0200 Subject: [PATCH] Delay puzzle box mover's goal location setting (closes #335) --- .../habbohotel/items/interactions/InteractionPuzzleBox.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionPuzzleBox.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionPuzzleBox.java index 21d42d2a..11867ace 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionPuzzleBox.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionPuzzleBox.java @@ -1,5 +1,6 @@ package com.eu.habbo.habbohotel.items.interactions; +import com.eu.habbo.Emulator; import com.eu.habbo.habbohotel.gameclients.GameClient; import com.eu.habbo.habbohotel.items.Item; import com.eu.habbo.habbohotel.rooms.*; @@ -56,7 +57,7 @@ public class InteractionPuzzleBox extends HabboItem { if (item == null || (item.getZ() <= this.getZ() && item.getBaseItem().allowWalk())) { room.scheduledComposers.add(new FloorItemOnRollerComposer(this, null, tile, offset, room).compose()); - client.getHabbo().getRoomUnit().setGoalLocation(boxLocation); + room.scheduledTasks.add(() -> client.getHabbo().getRoomUnit().setGoalLocation(boxLocation)); this.needsUpdate(true); } }