ForgePatch/patches/minecraft/net/minecraft/world/gen/feature/structure/StructurePiece.java.patch

13 lines
777 B
Diff

--- a/net/minecraft/world/gen/feature/structure/StructurePiece.java
+++ b/net/minecraft/world/gen/feature/structure/StructurePiece.java
@@ -57,6 +57,9 @@
}
public final CompoundNBT func_143010_b() {
+ if (Registry.field_218362_C.func_177774_c(this.func_214807_k()) == null) { // FORGE: Friendlier error then the Null String error below.
+ throw new RuntimeException("StructurePiece \"" + this.getClass().getName() + "\": \"" + this.func_214807_k() + "\" missing ID Mapping, Modder see MapGenStructureIO");
+ }
CompoundNBT compoundnbt = new CompoundNBT();
compoundnbt.func_74778_a("id", Registry.field_218362_C.func_177774_c(this.func_214807_k()).toString());
compoundnbt.func_218657_a("BB", this.field_74887_e.func_151535_h());