Current Chunk for Entity and Block Entities, counts by entity type
This enables us a fast reference to the entities current chunk instead of having to look it up by hashmap lookups. We also store counts by type to further enable other performance optimizations in later patches.
This commit is contained in:
@@ -8,7 +8,7 @@ Use an optimized method to test if a block position meets a desired light level.
|
||||
This method benefits from returning as soon as the desired light level matches.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockCrops.java b/src/main/java/net/minecraft/server/BlockCrops.java
|
||||
index c0b88580..55ed0c95 100644
|
||||
index c0b88580c..55ed0c956 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockCrops.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockCrops.java
|
||||
@@ -0,0 +0,0 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
|
||||
@@ -21,7 +21,7 @@ index c0b88580..55ed0c95 100644
|
||||
|
||||
if (i < this.g()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java
|
||||
index fe55848b..8fc736d6 100644
|
||||
index fe55848be..8fc736d6a 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockGrass.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockGrass.java
|
||||
@@ -0,0 +0,0 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
|
||||
@@ -65,7 +65,7 @@ index fe55848b..8fc736d6 100644
|
||||
// world.setTypeUpdate(blockposition1, Blocks.GRASS.getBlockData());
|
||||
org.bukkit.World bworld = world.getWorld();
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java
|
||||
index 6d0f4c15..3bbb123b 100644
|
||||
index 6d0f4c156..3bbb123bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockSapling.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockSapling.java
|
||||
@@ -0,0 +0,0 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
|
||||
@@ -78,7 +78,7 @@ index 6d0f4c15..3bbb123b 100644
|
||||
world.captureTreeGeneration = true;
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockStem.java b/src/main/java/net/minecraft/server/BlockStem.java
|
||||
index f12987c8..5ae7bd9d 100644
|
||||
index f12987c84..5ae7bd9df 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockStem.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockStem.java
|
||||
@@ -0,0 +0,0 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
|
||||
@@ -91,7 +91,7 @@ index f12987c8..5ae7bd9d 100644
|
||||
|
||||
if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
index 0f55cf51..8782bce5 100644
|
||||
index 0f55cf515..8782bce56 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||
@@ -118,7 +118,7 @@ index 0f55cf51..8782bce5 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 277f1414..6111ca0b 100644
|
||||
index 277f1414a..6111ca0b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -0,0 +0,0 @@ public class EntityZombie extends EntityMonster {
|
||||
|
||||
Reference in New Issue
Block a user