ForgePatch/patches_old_unknown/WorldServer.java.patch

23 lines
1.3 KiB
Diff
Raw Normal View History

--- ../src-base/minecraft/net/minecraft/world/WorldServer.java
+++ ../src-work/minecraft/net/minecraft/world/WorldServer.java
@@ -525,7 +539,10 @@
{
if (p_175654_2_.func_149698_L())
{
- if (this.func_175707_a(p_175654_1_.func_177982_a(-8, -8, -8), p_175654_1_.func_177982_a(8, 8, 8)))
+ //Keeping here as a note for future when it may be restored.
+ boolean isForced = getPersistentChunks().containsKey(new ChunkPos(p_175654_1_));
+ int range = isForced ? 0 : 8;
+ if (this.func_175707_a(p_175654_1_.func_177982_a(-range, -range, -range), p_175654_1_.func_177982_a(range, range, range)))
{
IBlockState iblockstate = this.func_180495_p(p_175654_1_);
@@ -561,6 +578,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.
NextTickListEntry nextticklistentry = new NextTickListEntry(p_180497_1_, p_180497_2_);
nextticklistentry.func_82753_a(p_180497_4_);
Material material = p_180497_2_.func_176223_P().func_185904_a();