[ci skip] Cleanup events (#10202)

This commit is contained in:
Lulu13022002 2024-02-01 10:15:57 +01:00 committed by GitHub
parent b3c81089ae
commit 294347bee2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
295 changed files with 3245 additions and 3088 deletions

View file

@ -18,10 +18,10 @@ 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 2c135093e8eee614e23676a2f07ee4a22ca8203c..19d6a829edb977d064c5d5a42ae3cab4fc806bb6 100644
index c8914696785d0d6c451d598616a83c316f611aad..8a7276f83744252ac5a418f9acb219e02c508b2f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -157,7 +157,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -152,7 +152,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710
public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false;
@ -30,7 +30,7 @@ index 2c135093e8eee614e23676a2f07ee4a22ca8203c..19d6a829edb977d064c5d5a42ae3cab4
public Map<BlockPos, BlockEntity> capturedTileEntities = new HashMap<>();
public List<ItemEntity> captureDrops;
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
@@ -395,7 +395,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -390,7 +390,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 2c135093e8eee614e23676a2f07ee4a22ca8203c..19d6a829edb977d064c5d5a42ae3cab4
if (blockstate == null) {
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
this.capturedBlockStates.put(pos.immutable(), blockstate);
@@ -415,7 +415,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -410,7 +410,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 2c135093e8eee614e23676a2f07ee4a22ca8203c..19d6a829edb977d064c5d5a42ae3cab4
this.capturedBlockStates.put(pos.immutable(), blockstate);
captured = true;
}
@@ -616,7 +617,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -611,7 +612,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public BlockState getBlockState(BlockPos pos) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {