From 5ed452660f26f0157e7012f231f56cb5aec63354 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Mon, 11 Jan 2021 13:07:46 +0100 Subject: [PATCH] Fixed elevator order (highest floor first) --- CHANGELOG.md | 1 + .../implementation/items/elevator/ElevatorPlate.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a0c45062..e694541bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ #### Changes #### Fixes +* Fixed elevator floor order ## Release Candidate 19 (11 Jan 2021) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/elevator/ElevatorPlate.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/elevator/ElevatorPlate.java index 7cf17b8c0..faffc1d10 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/elevator/ElevatorPlate.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/elevator/ElevatorPlate.java @@ -99,7 +99,7 @@ public class ElevatorPlate extends SimpleSlimefunItem { for (int y = 0; y < b.getWorld().getMaxHeight(); y++) { if (y == b.getY()) { String name = ChatColors.color(BlockStorage.getLocationInfo(b.getLocation(), DATA_KEY)); - floors.addLast(new ElevatorFloor(name, index, b)); + floors.addFirst(new ElevatorFloor(name, index, b)); index++; continue; } @@ -108,7 +108,7 @@ public class ElevatorPlate extends SimpleSlimefunItem { if (block.getType() == getItem().getType() && BlockStorage.check(block, getId())) { String name = ChatColors.color(BlockStorage.getLocationInfo(block.getLocation(), DATA_KEY)); - floors.addLast(new ElevatorFloor(name, index, block)); + floors.addFirst(new ElevatorFloor(name, index, block)); index++; } }