Avoid to throw BlockPhysicsEvent in Mystcraft's profiling world and come back incorrect chunks messages
This commit is contained in:
parent
e9789eccfc
commit
480506629d
@ -47,7 +47,7 @@ archivesBaseName = 'kcauldron'
|
|||||||
ext.mcVersion = "1.7.10"
|
ext.mcVersion = "1.7.10"
|
||||||
ext.cauldronVersion = "4"
|
ext.cauldronVersion = "4"
|
||||||
ext.forgeVersion = "1403"
|
ext.forgeVersion = "1403"
|
||||||
ext.revision = "64"
|
ext.revision = "66"
|
||||||
version = "${mcVersion}-${cauldronVersion}.${forgeVersion}.${revision}"
|
version = "${mcVersion}-${cauldronVersion}.${forgeVersion}.${revision}"
|
||||||
|
|
||||||
launch4j {
|
launch4j {
|
||||||
|
@ -593,7 +593,7 @@
|
|||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
+ CraftWorld world = ((WorldServer) this).getWorld();
|
+ CraftWorld world = ((WorldServer) this).getWorld();
|
||||||
+
|
+
|
||||||
+ if (world != null)
|
+ if (world != null && !isProfilingWorld())
|
||||||
+ {
|
+ {
|
||||||
+ BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(p_147460_1_, p_147460_2_, p_147460_3_),
|
+ BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(p_147460_1_, p_147460_2_, p_147460_3_),
|
||||||
+ CraftMagicNumbers.getId(p_147460_4_));
|
+ CraftMagicNumbers.getId(p_147460_4_));
|
||||||
@ -1284,7 +1284,7 @@
|
|||||||
{
|
{
|
||||||
dest.add(entity);
|
dest.add(entity);
|
||||||
}
|
}
|
||||||
@@ -4029,4 +4717,67 @@
|
@@ -4029,4 +4717,73 @@
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
@ -1351,4 +1351,10 @@
|
|||||||
+ tileLimiter = new TickLimiter(spigotConfig.tileMaxTickTime);
|
+ tileLimiter = new TickLimiter(spigotConfig.tileMaxTickTime);
|
||||||
+ }
|
+ }
|
||||||
+ // Spigot end
|
+ // Spigot end
|
||||||
|
+
|
||||||
|
+ // Cauldron start
|
||||||
|
+ public boolean isProfilingWorld() {
|
||||||
|
+ return provider.dimensionId == Integer.MIN_VALUE; // Mystcraft
|
||||||
|
+ }
|
||||||
|
+ // Cauldron end
|
||||||
}
|
}
|
||||||
|
@ -211,14 +211,14 @@
|
|||||||
+ return chunk;
|
+ return chunk;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /*if (p_73154_1_ != chunk.xPosition || p_73154_2_ != chunk.zPosition)
|
+ if ((p_73154_1_ != chunk.xPosition || p_73154_2_ != chunk.zPosition) && !worldObj.isProfilingWorld())
|
||||||
+ {
|
+ {
|
||||||
+ logger.error("Chunk (" + chunk.xPosition + ", " + chunk.zPosition + ") stored at (" + p_73154_1_ + ", " + p_73154_2_ + ") in world '" + worldObj.getWorld().getName() + "'");
|
+ logger.error("Chunk (" + chunk.xPosition + ", " + chunk.zPosition + ") stored at (" + p_73154_1_ + ", " + p_73154_2_ + ") in world '" + worldObj.getWorld().getName() + "'");
|
||||||
+ logger.error(chunk.getClass().getName());
|
+ logger.error(chunk.getClass().getName());
|
||||||
+ Throwable ex = new Throwable();
|
+ Throwable ex = new Throwable();
|
||||||
+ ex.fillInStackTrace();
|
+ ex.fillInStackTrace();
|
||||||
+ ex.printStackTrace();
|
+ ex.printStackTrace();
|
||||||
+ }*/ // Cauldron - workaroung of console spamming for mystcraft
|
+ }
|
||||||
+ chunk.lastAccessedTick = MinecraftServer.getServer().getTickCounter(); // Cauldron
|
+ chunk.lastAccessedTick = MinecraftServer.getServer().getTickCounter(); // Cauldron
|
||||||
+ return chunk;
|
+ return chunk;
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
|
Loading…
Reference in New Issue
Block a user