Fix initalization issue with the clamping threshold config value. And remove vanilla console spam related to it.
This commit is contained in:
parent
4299aa22ff
commit
1dc9ef9b08
4 changed files with 16 additions and 12 deletions
|
@ -25,7 +25,7 @@ import static net.minecraftforge.common.ForgeVersion.*;
|
|||
|
||||
public class ForgeDummyContainer extends DummyModContainer implements WorldAccessContainer
|
||||
{
|
||||
public static int clumpingThreshold;
|
||||
public static int clumpingThreshold = 64;
|
||||
|
||||
public ForgeDummyContainer()
|
||||
{
|
||||
|
|
|
@ -35,7 +35,6 @@ public class MinecraftForge
|
|||
public static final EventBus ORE_GEN_BUS = new EventBus();
|
||||
@Deprecated //Vanilla feature now
|
||||
public static boolean SPAWNER_ALLOW_ON_INVERTED = false;
|
||||
public static final int clumpingThreshold = ForgeDummyContainer.clumpingThreshold;
|
||||
|
||||
private static final ForgeInternalHandler INTERNAL_HANDLER = new ForgeInternalHandler();
|
||||
|
||||
|
|
|
@ -1,19 +1,23 @@
|
|||
--- ../src_base/minecraft/net/minecraft/network/packet/Packet52MultiBlockChange.java
|
||||
+++ ../src_work/minecraft/net/minecraft/network/packet/Packet52MultiBlockChange.java
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -6,6 +6,8 @@
|
||||
import java.io.IOException;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
+import net.minecraftforge.common.ForgeDummyContainer;
|
||||
+import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
public class Packet52MultiBlockChange extends Packet
|
||||
{
|
||||
@@ -38,7 +39,7 @@
|
||||
@@ -38,10 +40,8 @@
|
||||
|
||||
try
|
||||
{
|
||||
- if (par4 >= 64)
|
||||
+ if (par4 >= MinecraftForge.clumpingThreshold)
|
||||
+ if (par4 >= ForgeDummyContainer.clumpingThreshold)
|
||||
{
|
||||
System.out.println("ChunkTilesUpdatePacket compress " + par4);
|
||||
|
||||
- System.out.println("ChunkTilesUpdatePacket compress " + par4);
|
||||
-
|
||||
if (field_73449_e.length < var6)
|
||||
{
|
||||
field_73449_e = new byte[var6];
|
||||
|
|
|
@ -12,10 +12,11 @@
|
|||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.packet.Packet51MapChunk;
|
||||
@@ -10,9 +14,15 @@
|
||||
@@ -10,9 +14,16 @@
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.ChunkCoordIntPair;
|
||||
|
||||
+import net.minecraftforge.common.ForgeDummyContainer;
|
||||
+import net.minecraftforge.common.ForgeHooks;
|
||||
+import net.minecraftforge.common.MinecraftForge;
|
||||
+import net.minecraftforge.event.world.ChunkWatchEvent;
|
||||
|
@ -29,7 +30,7 @@
|
|||
|
||||
/** note: this is final */
|
||||
private final ChunkCoordIntPair chunkLocation;
|
||||
@@ -56,6 +66,8 @@
|
||||
@@ -56,6 +67,8 @@
|
||||
this.playersInChunk.remove(par1EntityPlayerMP);
|
||||
par1EntityPlayerMP.loadedChunks.remove(this.chunkLocation);
|
||||
|
||||
|
@ -38,7 +39,7 @@
|
|||
if (this.playersInChunk.isEmpty())
|
||||
{
|
||||
long var2 = (long)this.chunkLocation.chunkXPos + 2147483647L | (long)this.chunkLocation.chunkZPos + 2147483647L << 32;
|
||||
@@ -80,20 +92,21 @@
|
||||
@@ -80,20 +93,21 @@
|
||||
|
||||
this.field_73260_f |= 1 << (par2 >> 4);
|
||||
|
||||
|
@ -74,12 +75,12 @@
|
|||
}
|
||||
|
||||
public void sendToAllPlayersWatchingChunk(Packet par1Packet)
|
||||
@@ -133,40 +146,26 @@
|
||||
@@ -133,40 +147,26 @@
|
||||
{
|
||||
int var4;
|
||||
|
||||
- if (this.numberOfTilesToUpdate == 64)
|
||||
+ if (this.numberOfTilesToUpdate >= MinecraftForge.clumpingThreshold)
|
||||
+ if (this.numberOfTilesToUpdate >= ForgeDummyContainer.clumpingThreshold)
|
||||
{
|
||||
var1 = this.chunkLocation.chunkXPos * 16;
|
||||
var2 = this.chunkLocation.chunkZPos * 16;
|
||||
|
|
Loading…
Reference in a new issue