From 20ac73ca28469bfa64fdedc5ed67aa30af714f25 Mon Sep 17 00:00:00 2001 From: Jishuna Date: Wed, 31 Jan 2024 20:01:58 +1100 Subject: [PATCH] #1353: Fix Structure#place not working as documented with 0 palette --- .../structure/templatesystem/DefinedStructureInfo.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureInfo.patch b/nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureInfo.patch index 24c76defd..e9a703f1e 100644 --- a/nms-patches/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureInfo.patch +++ b/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."); + }