Skip to content

Commit f5866f1

Browse files
committed
fix RelativeBlockSample BlockEntity creation
1 parent 142eb7e commit f5866f1

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/main/schematics/org/dimdev/dimdoors/util/schematic/v2/RelativeBlockSample.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,13 @@ public void place(BlockPos origin, StructureWorldAccess world, boolean biomes) {
105105
BlockPos pos = entry.getKey();
106106
BlockPos actualPos = origin.add(entry.getKey());
107107

108-
BlockEntity blockEntity = BlockEntity.createFromTag(this.getBlockState(pos), entry.getValue());
108+
CompoundTag tag = entry.getValue();
109+
if(tag.contains("Id")) {
110+
tag.put("id", tag.get("Id")); // boogers
111+
tag.remove("Id");
112+
}
113+
114+
BlockEntity blockEntity = BlockEntity.createFromTag(this.getBlockState(pos), tag);
109115
if (blockEntity != null) {
110116
world.toServerWorld().setBlockEntity(actualPos, blockEntity);
111117
}

0 commit comments

Comments
 (0)