1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Fixed elevator order (highest floor first)

This commit is contained in:
TheBusyBiscuit 2021-01-11 13:07:46 +01:00
parent f6a9150296
commit 5ed452660f
2 changed files with 3 additions and 2 deletions

View File

@ -31,6 +31,7 @@
#### Changes
#### Fixes
* Fixed elevator floor order
## Release Candidate 19 (11 Jan 2021)

View File

@ -99,7 +99,7 @@ public class ElevatorPlate extends SimpleSlimefunItem<BlockUseHandler> {
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<BlockUseHandler> {
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++;
}
}