Fix structure template processors causing cascading world generation (#4979)

This commit is contained in:
Ben Staddon 2018-06-13 06:58:45 +01:00 committed by mezz
parent 9cda586ebd
commit fa50d98357

View file

@ -1,6 +1,15 @@
--- ../src-base/minecraft/net/minecraft/world/gen/structure/template/Template.java
+++ ../src-work/minecraft/net/minecraft/world/gen/structure/template/Template.java
@@ -514,6 +514,7 @@
@@ -211,6 +211,8 @@
for (Template.BlockInfo template$blockinfo : this.field_186270_a)
{
BlockPos blockpos = func_186266_a(p_189960_4_, template$blockinfo.field_186242_a).func_177971_a(p_189960_2_);
+ // Forge: skip processing blocks outside BB to prevent cascading worldgen issues
+ if (structureboundingbox != null && !structureboundingbox.func_175898_b(blockpos)) continue;
Template.BlockInfo template$blockinfo1 = p_189960_3_ != null ? p_189960_3_.func_189943_a(p_189960_1_, blockpos, template$blockinfo) : template$blockinfo;
if (template$blockinfo1 != null)
@@ -514,6 +516,7 @@
nbttaglist2.func_74742_a(NBTUtil.func_190009_a(new NBTTagCompound(), iblockstate));
}