Add wrapper exception to the new Structure ID system to point to the correct Structure.
This commit is contained in:
parent
80dfdbf749
commit
ab2d8fa01b
2 changed files with 28 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
--- ../src_base/minecraft/net/minecraft/world/gen/structure/StructureComponent.java
|
||||
+++ ../src_work/minecraft/net/minecraft/world/gen/structure/StructureComponent.java
|
||||
@@ -35,6 +35,11 @@
|
||||
|
||||
public NBTTagCompound func_143010_b()
|
||||
{
|
||||
+ if (MapGenStructureIO.func_143036_a(this) == null)
|
||||
+ {
|
||||
+ throw new RuntimeException("StructureComponent \"" + this.getClass().getName() + "\" missing ID Mapping, Modder see MapGenStructureIO");
|
||||
+ }
|
||||
+
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
nbttagcompound.setString("id", MapGenStructureIO.func_143036_a(this));
|
||||
nbttagcompound.setTag("BB", this.boundingBox.func_143047_a("BB"));
|
|
@ -0,0 +1,14 @@
|
|||
--- ../src_base/minecraft/net/minecraft/world/gen/structure/StructureStart.java
|
||||
+++ ../src_work/minecraft/net/minecraft/world/gen/structure/StructureStart.java
|
||||
@@ -68,6 +68,11 @@
|
||||
|
||||
public NBTTagCompound func_143021_a(int par1, int par2)
|
||||
{
|
||||
+ if (MapGenStructureIO.func_143033_a(this) == null)
|
||||
+ {
|
||||
+ throw new RuntimeException("StructureStart \"" + this.getClass().getName() + "\" missing ID Mapping, Modder see MapGenStructureIO");
|
||||
+ }
|
||||
+
|
||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||
nbttagcompound.setString("id", MapGenStructureIO.func_143033_a(this));
|
||||
nbttagcompound.setInteger("ChunkX", par1);
|
Loading…
Reference in a new issue