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

13 lines
902 B
Diff

--- a/net/minecraft/world/gen/feature/structure/StructureStart.java
+++ b/net/minecraft/world/gen/feature/structure/StructureStart.java
@@ -84,6 +84,9 @@
public CompoundNBT func_143021_a(int p_143021_1_, int p_143021_2_) {
CompoundNBT compoundnbt = new CompoundNBT();
if (this.func_75069_d()) {
+ if (Registry.field_218361_B.func_177774_c(this.func_214627_k()) == null) { // FORGE: This is just a more friendly error instead of the 'Null String' below
+ throw new RuntimeException("StructureStart \"" + this.getClass().getName() + "\": \"" + this.func_214627_k() + "\" missing ID Mapping, Modder see MapGenStructureIO");
+ }
compoundnbt.func_74778_a("id", Registry.field_218361_B.func_177774_c(this.func_214627_k()).toString());
compoundnbt.func_74768_a("ChunkX", p_143021_1_);
compoundnbt.func_74768_a("ChunkZ", p_143021_2_);