Initial 1.18 update

This commit is contained in:
Nassim Jahnke 2022-02-28 22:43:03 -07:00 committed by Jason Penilla
parent 30cb7d0407
commit c2e2281f29
No known key found for this signature in database
GPG key ID: 0E75A301420E48F8
556 changed files with 3417 additions and 3610 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 20f73254881e0ed2957329245acef58c99e93fcb..cd4c3be34647e772753dc68fbe50060365d8cd29 100644
index a7fbaa420bf18649cdcb94d53e7d5cfd704d9555..46168d119d10231b8b946015245a476e0b56d567 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -144,7 +144,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -142,7 +142,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 20f73254881e0ed2957329245acef58c99e93fcb..cd4c3be34647e772753dc68fbe500603
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<>();
@@ -362,7 +362,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -361,7 +361,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 20f73254881e0ed2957329245acef58c99e93fcb..cd4c3be34647e772753dc68fbe500603
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 {
@@ -381,7 +381,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 20f73254881e0ed2957329245acef58c99e93fcb..cd4c3be34647e772753dc68fbe500603
this.capturedBlockStates.put(pos.immutable(), blockstate);
captured = true;
}
@@ -651,7 +652,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -650,7 +651,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public BlockState getBlockState(BlockPos pos) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {