Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/NukkitX/Nukkit into redstone
Browse files Browse the repository at this point in the history
  • Loading branch information
SupremeMortal committed Apr 6, 2020
2 parents 6b047b4 + f247cae commit a36d857
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/cn/nukkit/level/GlobalBlockPalette.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ public static int getOrCreateRuntimeId(int id, int meta) {
int legacyId = id << 6 | meta;
int runtimeId = legacyToRuntimeId.get(legacyId);
if (runtimeId == -1) {
//runtimeId = registerMapping(runtimeIdAllocator.incrementAndGet(), legacyId);
throw new NoSuchElementException("Unmapped block registered id:" + id + " meta:" + meta);
runtimeId = legacyToRuntimeId.get(id << 6);
if (runtimeId == -1) {
throw new NoSuchElementException("Unmapped block registered id:" + id + " meta:" + meta);
}
}
return runtimeId;
}
Expand Down

0 comments on commit a36d857

Please sign in to comment.