mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 04:09:51 +00:00
Prevent a crash when scheduling block updates for non-existing blocks #3485
This commit is contained in:
1 parent
daf21e4dcf
commit
aee9d8c9b4
1 file changed
+20
-12
@@ -128,7 +128,15 @@
|
||||
{
|
||||
IBlockState iblockstate = this.func_180495_p(p_175654_1_);
|
||||
|
||||
@@ -588,7 +604,7 @@
|
||||
@@ -564,6 +580,7 @@
|
||||
|
||||
public void func_180497_b(BlockPos p_180497_1_, Block p_180497_2_, int p_180497_3_, int p_180497_4_)
|
||||
{
|
||||
+ if (p_180497_2_ == null) return; //Forge: Prevent null blocks from ticking, can happen if blocks are removed in old worlds. TODO: Fix real issue causing block to be null.
|
||||
if (p_180497_1_ instanceof BlockPos.MutableBlockPos || p_180497_1_ instanceof BlockPos.PooledMutableBlockPos)
|
||||
{
|
||||
p_180497_1_ = new BlockPos(p_180497_1_);
|
||||
@@ -588,7 +605,7 @@
|
||||
|
||||
public void func_72939_s()
|
||||
{
|
||||
@@ -137,7 +145,7 @@
|
||||
{
|
||||
if (this.field_80004_Q++ >= 300)
|
||||
{
|
||||
@@ -712,6 +728,9 @@
|
||||
@@ -712,6 +729,9 @@
|
||||
{
|
||||
NextTickListEntry nextticklistentry1 = (NextTickListEntry)iterator.next();
|
||||
iterator.remove();
|
||||
@@ -147,7 +155,7 @@
|
||||
int k = 0;
|
||||
|
||||
if (this.func_175707_a(nextticklistentry1.field_180282_a.func_177982_a(0, 0, 0), nextticklistentry1.field_180282_a.func_177982_a(0, 0, 0)))
|
||||
@@ -838,6 +857,10 @@
|
||||
@@ -838,6 +858,10 @@
|
||||
|
||||
public boolean func_175660_a(EntityPlayer p_175660_1_, BlockPos p_175660_2_)
|
||||
{
|
||||
@@ -158,7 +166,7 @@
|
||||
return !this.field_73061_a.func_175579_a(this, p_175660_2_, p_175660_1_) && this.func_175723_af().func_177746_a(p_175660_2_);
|
||||
}
|
||||
|
||||
@@ -903,6 +926,7 @@
|
||||
@@ -903,6 +927,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -166,7 +174,7 @@
|
||||
this.field_72987_B = true;
|
||||
BiomeProvider biomeprovider = this.field_73011_w.func_177499_m();
|
||||
List<Biome> list = biomeprovider.func_76932_a();
|
||||
@@ -988,6 +1012,7 @@
|
||||
@@ -988,6 +1013,7 @@
|
||||
}
|
||||
|
||||
chunkproviderserver.func_186027_a(p_73044_1_);
|
||||
@@ -174,7 +182,7 @@
|
||||
|
||||
for (Chunk chunk : Lists.newArrayList(chunkproviderserver.func_189548_a()))
|
||||
{
|
||||
@@ -1032,6 +1057,7 @@
|
||||
@@ -1032,6 +1058,7 @@
|
||||
this.field_72986_A.func_176135_e(this.func_175723_af().func_177732_i());
|
||||
this.field_73019_z.func_75755_a(this.field_72986_A, this.field_73061_a.func_184103_al().func_72378_q());
|
||||
this.field_72988_C.func_75744_a();
|
||||
@@ -182,7 +190,7 @@
|
||||
}
|
||||
|
||||
public boolean func_72838_d(Entity p_72838_1_)
|
||||
@@ -1043,7 +1069,7 @@
|
||||
@@ -1043,7 +1070,7 @@
|
||||
{
|
||||
for (Entity entity : Lists.newArrayList(p_175650_1_))
|
||||
{
|
||||
@@ -191,7 +199,7 @@
|
||||
{
|
||||
this.field_72996_f.add(entity);
|
||||
this.func_72923_a(entity);
|
||||
@@ -1124,7 +1150,7 @@
|
||||
@@ -1124,7 +1151,7 @@
|
||||
{
|
||||
if (super.func_72942_c(p_72942_1_))
|
||||
{
|
||||
@@ -200,7 +208,7 @@
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -1146,6 +1172,7 @@
|
||||
@@ -1146,6 +1173,7 @@
|
||||
public Explosion func_72885_a(@Nullable Entity p_72885_1_, double p_72885_2_, double p_72885_4_, double p_72885_6_, float p_72885_8_, boolean p_72885_9_, boolean p_72885_10_)
|
||||
{
|
||||
Explosion explosion = new Explosion(this, p_72885_1_, p_72885_2_, p_72885_4_, p_72885_6_, p_72885_8_, p_72885_9_, p_72885_10_);
|
||||
@@ -208,7 +216,7 @@
|
||||
explosion.func_77278_a();
|
||||
explosion.func_77279_a(false);
|
||||
|
||||
@@ -1191,7 +1218,7 @@
|
||||
@@ -1191,7 +1219,7 @@
|
||||
{
|
||||
if (this.func_147485_a(blockeventdata))
|
||||
{
|
||||
@@ -217,7 +225,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1217,27 +1244,31 @@
|
||||
@@ -1217,27 +1245,31 @@
|
||||
|
||||
if (this.field_73003_n != this.field_73004_o)
|
||||
{
|
||||
@@ -255,7 +263,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1322,6 +1353,11 @@
|
||||
@@ -1322,6 +1354,11 @@
|
||||
return this.func_72863_F().func_180513_a(this, p_190528_1_, p_190528_2_, p_190528_3_);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user