properly handle the result of TE NBT transformers.

This commit is contained in:
Guillaume Mercier committed 2026-01-27 17:49:46 -05:00
1 parent 3868d131a7
commit 8fec8f2a8a
1 file changed
+4 -4
@@ -130,11 +130,11 @@ public class ChunkFixerUtility {
BlockInfo blockInfo = transformationFunction.apply(tileEntity, world, chunk);
if (blockInfo == null) continue;
if (blockInfo.tileTransformer == null) {
tileEntities.removeTag(i--);
NBTTagCompound newTag;
if (blockInfo.tileTransformer != null && (newTag = blockInfo.tileTransformer.apply(tileEntity)) != null) {
((IMixinNBTTagList) tileEntities).Postea$replaceCompoundTagAt(i, newTag);
} else {
((IMixinNBTTagList) tileEntities)
.Postea$replaceCompoundTagAt(i, blockInfo.tileTransformer.apply(tileEntity));
tileEntities.removeTag(i--);
}
conversionInfo.add(new ConversionInfo(x, y, z, blockInfo));