MC Utils
== AT == public net.minecraft.server.level.ServerChunkCache mainThread public net.minecraft.server.level.ServerLevel chunkSource public org.bukkit.craftbukkit.inventory.CraftItemStack handle public net.minecraft.server.level.ChunkMap getVisibleChunkIfPresent(J)Lnet/minecraft/server/level/ChunkHolder; public net.minecraft.server.level.ServerChunkCache mainThreadProcessor public net.minecraft.server.level.ServerChunkCache$MainThreadExecutor public net.minecraft.world.level.chunk.LevelChunkSection states
This commit is contained in:
@@ -50,7 +50,33 @@
|
||||
}
|
||||
|
||||
state.spawnAfterBreak(world, pos, ItemStack.EMPTY, flag);
|
||||
@@ -1125,9 +1139,15 @@
|
||||
@@ -873,12 +887,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ protected boolean shapeExceedsCube = true; // Paper - moved from actual method to here
|
||||
public void initCache() {
|
||||
this.fluidState = ((Block) this.owner).getFluidState(this.asState());
|
||||
this.isRandomlyTicking = ((Block) this.owner).isRandomlyTicking(this.asState());
|
||||
if (!this.getBlock().hasDynamicShape()) {
|
||||
this.cache = new BlockBehaviour.BlockStateBase.Cache(this.asState());
|
||||
}
|
||||
+ this.shapeExceedsCube = this.cache == null || this.cache.largeCollisionShape; // Paper - moved from actual method to here
|
||||
|
||||
this.legacySolid = this.calculateSolid();
|
||||
this.occlusionShape = this.canOcclude ? ((Block) this.owner).getOcclusionShape(this.asState()) : Shapes.empty();
|
||||
@@ -945,8 +961,8 @@
|
||||
return this.occlusionShape;
|
||||
}
|
||||
|
||||
- public boolean hasLargeCollisionShape() {
|
||||
- return this.cache == null || this.cache.largeCollisionShape;
|
||||
+ public final boolean hasLargeCollisionShape() { // Paper
|
||||
+ return this.shapeExceedsCube; // Paper - moved into shape cache init
|
||||
}
|
||||
|
||||
public boolean useShapeForLightOcclusion() {
|
||||
@@ -1125,9 +1141,15 @@
|
||||
}
|
||||
|
||||
public void onPlace(Level world, BlockPos pos, BlockState state, boolean notify) {
|
||||
|
||||
Reference in New Issue
Block a user