add back Optimize collision to not load chunks

This commit is contained in:
Jake 2021-11-24 10:46:06 -08:00 committed by MiniDigger | Martin
parent c280dbeed0
commit f331ac28e0
204 changed files with 138 additions and 133 deletions

View file

@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping
information on restoration when the event is cancelled.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 8844a6d3e06d5a29013fdf78072109cc50819d71..21491224a8383cef2d41b0da2e7de9362fe1d27f 100644
index 515ca01ac46df23399ff49ca53d336db68b5a898..04d5c09def0901ad36bab682a333bc41278dadf9 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -142,7 +142,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -30,7 +30,7 @@ index 8844a6d3e06d5a29013fdf78072109cc50819d71..21491224a8383cef2d41b0da2e7de936
public Map<BlockPos, BlockEntity> capturedTileEntities = new HashMap<>();
public List<ItemEntity> captureDrops;
public long ticksPerAnimalSpawns;
@@ -362,7 +362,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -363,7 +363,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {
@ -39,7 +39,7 @@ index 8844a6d3e06d5a29013fdf78072109cc50819d71..21491224a8383cef2d41b0da2e7de936
if (blockstate == null) {
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
this.capturedBlockStates.put(pos.immutable(), blockstate);
@@ -382,7 +382,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -383,7 +383,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start - capture blockstates
boolean captured = false;
if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) {
@ -49,7 +49,7 @@ index 8844a6d3e06d5a29013fdf78072109cc50819d71..21491224a8383cef2d41b0da2e7de936
this.capturedBlockStates.put(pos.immutable(), blockstate);
captured = true;
}
@@ -651,7 +652,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -652,7 +653,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public BlockState getBlockState(BlockPos pos) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {