mirror of
https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git
synced 2025-04-22 02:59:05 +00:00
#1353: Fix Structure#place not working as documented with 0 palette
This commit is contained in:
2
nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureInfo.patch
2
nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureInfo.patch
@ -14,7 +14,7 @@
|
||||
if (i == 0) {
|
||||
throw new IllegalStateException("No palettes");
|
||||
+ // CraftBukkit start
|
||||
+ } else if (this.palette > 0) {
|
||||
+ } else if (this.palette >= 0) {
|
||||
+ if (this.palette >= i) {
|
||||
+ throw new IllegalArgumentException("Palette index out of bounds. Got " + this.palette + " where there are only " + i + " palettes available.");
|
||||
+ }
|
||||
|
Reference in New Issue
Block a user