Files
CatServer/patches/net/minecraft/world/gen/structure/StructureComponent.java.patch
2020-05-06 05:37:07 +08:00

14 lines
782 B
Diff

--- ../src-base/minecraft/net/minecraft/world/gen/structure/StructureComponent.java
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/StructureComponent.java
@@ -41,6 +41,10 @@
public final NBTTagCompound createStructureBaseNBT()
{
+ if (MapGenStructureIO.getStructureComponentName(this) == null) // Friendlier error then the Null String error below.
+ {
+ throw new RuntimeException("StructureComponent \"" + this.getClass().getName() + "\" missing ID Mapping, Modder see MapGenStructureIO");
+ }
NBTTagCompound nbttagcompound = new NBTTagCompound();
nbttagcompound.setString("id", MapGenStructureIO.getStructureComponentName(this));
nbttagcompound.setTag("BB", this.boundingBox.toNBTTagIntArray());