Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
[ci skip] Small cleanup to mc utils patch
Dieser Commit ist enthalten in:
Ursprung
f28caff927
Commit
a0ffb57745
@ -5926,26 +5926,6 @@ index d3afd54f546ae81f1c6d1a3ca9ee4e8e5c786ae4..114f4017c4133042178c57d424f10079
|
||||
}
|
||||
|
||||
public static long getEpochMillis() {
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index 2bb5e51f71cbf66819d198505aa4a5ecffd246c6..1834f3efb05fd70c8c1c67733bff514829ae1154 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -562,6 +562,7 @@ public class BlockPos extends Vec3i {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start - comment out useless overrides @Override - TODO figure out why this is suddenly important to keep
|
||||
@Override
|
||||
public BlockPos.MutableBlockPos setX(int i) {
|
||||
super.setX(i);
|
||||
@@ -579,6 +580,7 @@ public class BlockPos extends Vec3i {
|
||||
super.setZ(i);
|
||||
return this;
|
||||
}
|
||||
+ // Paper end
|
||||
|
||||
@Override
|
||||
public BlockPos immutable() {
|
||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
index c77fc9b93f3213655b2cc89f4afdec893f1cd22d..c77a6bb6885ffaaa4d9e1aa9d4770d5e847a590b 100644
|
||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||
@ -6982,18 +6962,10 @@ index 1d12a7934308aa48d7ea7fa10c7b6b5ccb27e707..7cacfceed5ef9276a19123a8a9079579
|
||||
ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 9cf839be15126444d4d2ffdb7faa637859941d6b..3bd2bddb782d29e647a1f1b362a39d224151f8b1 100644
|
||||
index 9cf839be15126444d4d2ffdb7faa637859941d6b..cb6fbb3a1512d69a3f1192c969c3d5c78c046cef 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -178,6 +178,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
|
||||
import org.bukkit.event.world.GenericGameEvent;
|
||||
import org.bukkit.event.world.TimeSkipEvent;
|
||||
// CraftBukkit end
|
||||
+import it.unimi.dsi.fastutil.ints.IntArrayList; // Paper
|
||||
|
||||
public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@@ -230,6 +231,98 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -230,6 +230,98 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return this.convertable.dimensionType;
|
||||
}
|
||||
|
||||
@ -7319,7 +7291,7 @@ index 1c71d2c1b16bdba1e14a8230787e4cb4ad530163..d6d8bbc98fc71997cb52521d59ebb59d
|
||||
FluidState getFluidState(BlockPos pos);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/ChunkPos.java b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
index 43bb3f5a617f4a6d719b02023a71edcb12aa9d05..34457c8afb4575d2395148f0a2bde6a96ec5e797 100644
|
||||
index 43bb3f5a617f4a6d719b02023a71edcb12aa9d05..2f47004a34f28a58965b1c47e78fb07ae15770cb 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/ChunkPos.java
|
||||
@@ -20,6 +20,7 @@ public class ChunkPos {
|
||||
@ -7350,7 +7322,7 @@ index 43bb3f5a617f4a6d719b02023a71edcb12aa9d05..34457c8afb4575d2395148f0a2bde6a9
|
||||
}
|
||||
|
||||
public static ChunkPos minFromRegion(int x, int z) {
|
||||
@@ -48,10 +52,10 @@ public class ChunkPos {
|
||||
@@ -48,7 +52,7 @@ public class ChunkPos {
|
||||
}
|
||||
|
||||
public long toLong() {
|
||||
@ -7358,11 +7330,7 @@ index 43bb3f5a617f4a6d719b02023a71edcb12aa9d05..34457c8afb4575d2395148f0a2bde6a9
|
||||
+ return longKey; // Paper
|
||||
}
|
||||
|
||||
- public static long asLong(int chunkX, int chunkZ) {
|
||||
+ public static long asLong(int chunkX, int chunkZ) {
|
||||
return (long)chunkX & 4294967295L | ((long)chunkZ & 4294967295L) << 32;
|
||||
}
|
||||
|
||||
public static long asLong(int chunkX, int chunkZ) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/EmptyBlockGetter.java b/src/main/java/net/minecraft/world/level/EmptyBlockGetter.java
|
||||
index 3c707d6674b2594b09503b959a31c1f4ad3981e6..db61b6b0158a9bcc0e1d735e34fe3671f8c89e21 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/EmptyBlockGetter.java
|
||||
@ -7540,29 +7508,9 @@ index 249b3ed33672a9a9529bd14de978722b62019314..0f1025495237aebe30132ace0832aa57
|
||||
public WorldBorder getWorldBorder() {
|
||||
return this.level.getWorldBorder();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 171956fbe47032cfac8811ab7fbe94415560304b..07e41b936f5f229876cf9ff5cd8d6278088eee48 100644
|
||||
index 171956fbe47032cfac8811ab7fbe94415560304b..b6d3f9f9520e410526cfeabcdeb9720dbe30e4bf 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -821,8 +821,8 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
|
||||
public abstract static class BlockStateBase extends StateHolder<Block, BlockState> {
|
||||
|
||||
- private final int lightEmission;
|
||||
- private final boolean useShapeForLightOcclusion;
|
||||
+ private final int lightEmission; public final int getEmittedLight() { return this.lightEmission; } // Paper - OBFHELPER
|
||||
+ private final boolean useShapeForLightOcclusion; public final boolean isTransparentOnSomeFaces() { return this.useShapeForLightOcclusion; } // Paper - OBFHELPER
|
||||
private final boolean isAir;
|
||||
private final boolean ignitedByLava;
|
||||
/** @deprecated */
|
||||
@@ -835,7 +835,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
private final MapColor mapColor;
|
||||
public final float destroySpeed;
|
||||
private final boolean requiresCorrectToolForDrops;
|
||||
- private final boolean canOcclude;
|
||||
+ private final boolean canOcclude; public final boolean isOpaque() { return this.canOcclude; } // Paper - OBFHELPER
|
||||
private final BlockBehaviour.StatePredicate isRedstoneConductor;
|
||||
private final BlockBehaviour.StatePredicate isSuffocating;
|
||||
private final BlockBehaviour.StatePredicate isViewBlocking;
|
||||
@@ -896,12 +896,20 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
}
|
||||
}
|
||||
@ -7619,7 +7567,7 @@ index 532a0cae6db0d830e720a72e9021aa7a8ed0f106..e5e562f75e7d4b6a750f192842940c5e
|
||||
this.levelHeightAccessor = heightLimitView;
|
||||
this.sections = new LevelChunkSection[heightLimitView.getSectionsCount()];
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 57805b84054e44a3d7c95cf269316a42205bb99c..17d36b53ec8efbc60b0648764f7195003e40fdcc 100644
|
||||
index 57805b84054e44a3d7c95cf269316a42205bb99c..e9670e43a146288ad0e5a33dfc02b90fc1eee95b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -114,6 +114,109 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -7751,15 +7699,7 @@ index 57805b84054e44a3d7c95cf269316a42205bb99c..17d36b53ec8efbc60b0648764f719500
|
||||
@Override
|
||||
public FluidState getFluidState(BlockPos pos) {
|
||||
return this.getFluidState(pos.getX(), pos.getY(), pos.getZ());
|
||||
@@ -355,6 +470,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
return this.getBlockEntity(pos, LevelChunk.EntityCreationType.CHECK);
|
||||
}
|
||||
|
||||
+ @Deprecated @Nullable public final BlockEntity getTileEntityImmediately(BlockPos pos) { return this.getBlockEntity(pos, EntityCreationType.IMMEDIATE); } // Paper - OBFHELPER
|
||||
@Nullable
|
||||
public BlockEntity getBlockEntity(BlockPos pos, LevelChunk.EntityCreationType creationType) {
|
||||
// CraftBukkit start
|
||||
@@ -537,7 +653,25 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -537,7 +652,25 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
// CraftBukkit start
|
||||
public void loadCallback() {
|
||||
@ -7785,7 +7725,7 @@ index 57805b84054e44a3d7c95cf269316a42205bb99c..17d36b53ec8efbc60b0648764f719500
|
||||
if (server != null) {
|
||||
/*
|
||||
* If it's a new world, the first few chunks are generated inside
|
||||
@@ -578,6 +712,22 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -578,6 +711,22 @@ public class LevelChunk extends ChunkAccess {
|
||||
server.getPluginManager().callEvent(unloadEvent);
|
||||
// note: saving can be prevented, but not forced if no saving is actually required
|
||||
this.mustNotSave = !unloadEvent.isSaveChunk();
|
||||
|
@ -1123,7 +1123,7 @@ index 7cacfceed5ef9276a19123a8a9079579423d03ac..5cd680d2ed47aadb5e65a775d70bc662
|
||||
gameprofilerfiller.pop();
|
||||
gameprofilerfiller.pop();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 3bd2bddb782d29e647a1f1b362a39d224151f8b1..3851c1026b91b77a02dbb5df1a1eedb212ac2a06 100644
|
||||
index cb6fbb3a1512d69a3f1192c969c3d5c78c046cef..96b1e1669b4a425bc18e5c00da18a79f20fc3e9b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1,6 +1,8 @@
|
||||
@ -1143,7 +1143,7 @@ index 3bd2bddb782d29e647a1f1b362a39d224151f8b1..3851c1026b91b77a02dbb5df1a1eedb2
|
||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
|
||||
import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
||||
@@ -472,7 +473,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -471,7 +472,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
gameprofilerfiller.popPush("tickPending");
|
||||
@ -1152,7 +1152,7 @@ index 3bd2bddb782d29e647a1f1b362a39d224151f8b1..3851c1026b91b77a02dbb5df1a1eedb2
|
||||
if (!this.isDebug() && flag) {
|
||||
j = this.getGameTime();
|
||||
gameprofilerfiller.push("blockTicks");
|
||||
@@ -481,15 +482,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -480,15 +481,19 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.fluidTicks.tick(j, 65536, this::tickFluid);
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
@ -1173,7 +1173,7 @@ index 3bd2bddb782d29e647a1f1b362a39d224151f8b1..3851c1026b91b77a02dbb5df1a1eedb2
|
||||
gameprofilerfiller.popPush("blockEvents");
|
||||
if (flag) {
|
||||
this.timings.doSounds.startTiming(); // Spigot
|
||||
@@ -642,6 +647,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -641,6 +646,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
gameprofilerfiller.popPush("tickBlocks");
|
||||
@ -1181,7 +1181,7 @@ index 3bd2bddb782d29e647a1f1b362a39d224151f8b1..3851c1026b91b77a02dbb5df1a1eedb2
|
||||
if (randomTickSpeed > 0) {
|
||||
LevelChunkSection[] achunksection = chunk.getSections();
|
||||
|
||||
@@ -674,6 +680,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -673,6 +679,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1189,7 +1189,7 @@ index 3bd2bddb782d29e647a1f1b362a39d224151f8b1..3851c1026b91b77a02dbb5df1a1eedb2
|
||||
gameprofilerfiller.pop();
|
||||
}
|
||||
|
||||
@@ -950,14 +957,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -949,14 +956,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void tickNonPassenger(Entity entity) {
|
||||
@ -1213,7 +1213,7 @@ index 3bd2bddb782d29e647a1f1b362a39d224151f8b1..3851c1026b91b77a02dbb5df1a1eedb2
|
||||
entity.setOldPosAndRot();
|
||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||
|
||||
@@ -976,7 +991,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -975,7 +990,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
this.tickPassenger(entity, entity1);
|
||||
}
|
||||
@ -1222,7 +1222,7 @@ index 3bd2bddb782d29e647a1f1b362a39d224151f8b1..3851c1026b91b77a02dbb5df1a1eedb2
|
||||
|
||||
}
|
||||
|
||||
@@ -1018,6 +1033,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1017,6 +1032,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
if (!savingDisabled) {
|
||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
|
||||
@ -1230,7 +1230,7 @@ index 3bd2bddb782d29e647a1f1b362a39d224151f8b1..3851c1026b91b77a02dbb5df1a1eedb2
|
||||
if (progressListener != null) {
|
||||
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
||||
}
|
||||
@@ -1027,7 +1043,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1026,7 +1042,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
progressListener.progressStage(Component.translatable("menu.savingChunks"));
|
||||
}
|
||||
|
||||
@ -1557,10 +1557,10 @@ index c02fa35cefc9194d1838abbe4f2dc2b226a41e41..b300d12e9e00519028b53aca9c3fb01f
|
||||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
public CraftPersistentDataContainer persistentDataContainer;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 17d36b53ec8efbc60b0648764f7195003e40fdcc..93348550f1632f7fc567eb5b42cd03d78532e383 100644
|
||||
index e9670e43a146288ad0e5a33dfc02b90fc1eee95b..93a73367e004979a015704d94a5669d154a2f71b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -682,6 +682,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -681,6 +681,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration));
|
||||
|
||||
if (this.needsDecoration) {
|
||||
@ -1568,7 +1568,7 @@ index 17d36b53ec8efbc60b0648764f7195003e40fdcc..93348550f1632f7fc567eb5b42cd03d7
|
||||
this.needsDecoration = false;
|
||||
java.util.Random random = new java.util.Random();
|
||||
random.setSeed(this.level.getSeed());
|
||||
@@ -701,6 +702,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -700,6 +701,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
}
|
||||
}
|
||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
||||
|
@ -4883,14 +4883,14 @@ index d11741d2618976bdb51f75d823f260f32d5bafc9..23dfc741b31cdc25265fb5daffcae634
|
||||
return this.level.getChunkSource().chunkMap.isOldChunkAround(chunkPos, checkRadius);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 07e41b936f5f229876cf9ff5cd8d6278088eee48..bf42cead5fa040d87da28d7be521b109724da19b 100644
|
||||
index b6d3f9f9520e410526cfeabcdeb9720dbe30e4bf..a009fca54665cbc3f11cad776256fbf1fbbb18c7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -874,6 +874,7 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
this.spawnTerrainParticles = blockbase_info.spawnTerrainParticles;
|
||||
this.instrument = blockbase_info.instrument;
|
||||
this.replaceable = blockbase_info.replaceable;
|
||||
+ this.conditionallyFullOpaque = this.isOpaque() & this.isTransparentOnSomeFaces(); // Paper
|
||||
+ this.conditionallyFullOpaque = this.canOcclude & this.useShapeForLightOcclusion; // Paper
|
||||
}
|
||||
|
||||
private boolean calculateSolid() {
|
||||
@ -5135,7 +5135,7 @@ index 6bb508105641b5729572736c5c3f9bd6711e309a..60e760b42dd6471a229dfd45490dcf8c
|
||||
@Override
|
||||
public BlockEntity getBlockEntity(BlockPos pos) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 93348550f1632f7fc567eb5b42cd03d78532e383..42f29413d18b0df039736a87e4e5c1d15700f916 100644
|
||||
index 93a73367e004979a015704d94a5669d154a2f71b..17725dba7cbcdce00cd23c3956eaf1642d9c424f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -219,6 +219,12 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
@ -19538,10 +19538,10 @@ index 5cd680d2ed47aadb5e65a775d70bc662a92e3d7a..1ad6b62ee53e2ee4a710211dfc750780
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493f31fc964 100644
|
||||
index 96b1e1669b4a425bc18e5c00da18a79f20fc3e9b..c64448bec0dd18a49b2151c9e2ca528a65264031 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -196,7 +196,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -195,7 +195,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
private final MinecraftServer server;
|
||||
public final PrimaryLevelData serverLevelData; // CraftBukkit - type
|
||||
final EntityTickList entityTickList;
|
||||
@ -19550,7 +19550,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
private final GameEventDispatcher gameEventDispatcher;
|
||||
public boolean noSave;
|
||||
private final SleepStatus sleepStatus;
|
||||
@@ -262,50 +262,65 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -261,50 +261,65 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -19643,7 +19643,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
|
||||
chunkProvider.addTicketAtLevel(TicketType.UNKNOWN, chunkPos, ticketLevel, chunkPos);
|
||||
chunkProvider.removeTicketAtLevel(TicketType.FUTURE_AWAIT, chunkPos, ticketLevel, holderIdentifier);
|
||||
@@ -317,12 +332,228 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -316,12 +331,228 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
for (int cx = minChunkX; cx <= maxChunkX; ++cx) {
|
||||
for (int cz = minChunkZ; cz <= maxChunkZ; ++cz) {
|
||||
io.papermc.paper.chunk.system.ChunkSystem.scheduleChunkLoad(
|
||||
@ -19874,7 +19874,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
|
||||
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||
@@ -366,16 +597,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -365,16 +596,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit end
|
||||
boolean flag2 = minecraftserver.forceSynchronousWrites();
|
||||
DataFixer datafixer = minecraftserver.getFixerUpper();
|
||||
@ -19896,7 +19896,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
return minecraftserver.overworld().getDataStorage();
|
||||
});
|
||||
this.chunkSource.getGeneratorState().ensureStructuresGenerated();
|
||||
@@ -404,6 +635,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -403,6 +634,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return (RandomSequences) this.getDataStorage().computeIfAbsent(RandomSequences.factory(l), "random_sequences");
|
||||
});
|
||||
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
|
||||
@ -19906,7 +19906,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
}
|
||||
|
||||
/** @deprecated */
|
||||
@@ -529,7 +763,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -528,7 +762,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
gameprofilerfiller.push("checkDespawn");
|
||||
entity.checkDespawn();
|
||||
gameprofilerfiller.pop();
|
||||
@ -19915,7 +19915,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
Entity entity1 = entity.getVehicle();
|
||||
|
||||
if (entity1 != null) {
|
||||
@@ -554,13 +788,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -553,13 +787,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
gameprofilerfiller.push("entityManagement");
|
||||
@ -19934,7 +19934,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
}
|
||||
|
||||
protected void tickTime() {
|
||||
@@ -1029,6 +1266,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1028,6 +1265,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void save(@Nullable ProgressListener progressListener, boolean flush, boolean savingDisabled) {
|
||||
@ -19946,7 +19946,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
ServerChunkCache chunkproviderserver = this.getChunkSource();
|
||||
|
||||
if (!savingDisabled) {
|
||||
@@ -1044,16 +1286,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1043,16 +1285,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
timings.worldSaveChunks.startTiming(); // Paper
|
||||
@ -19967,7 +19967,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
|
||||
// CraftBukkit start - moved from MinecraftServer.saveChunks
|
||||
ServerLevel worldserver1 = this;
|
||||
@@ -1189,7 +1428,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1188,7 +1427,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.removePlayerImmediately((ServerPlayer) entity, Entity.RemovalReason.DISCARDED);
|
||||
}
|
||||
|
||||
@ -19976,7 +19976,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1205,7 +1444,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1204,7 +1443,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@ -19985,7 +19985,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1217,10 +1456,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1216,10 +1455,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public boolean tryAddFreshEntityWithPassengers(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
|
||||
// CraftBukkit end
|
||||
Stream<UUID> stream = entity.getSelfAndPassengers().map(Entity::getUUID); // CraftBukkit - decompile error
|
||||
@ -19999,7 +19999,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
return false;
|
||||
} else {
|
||||
this.addFreshEntityWithPassengers(entity, reason); // CraftBukkit
|
||||
@@ -1746,7 +1985,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1745,7 +1984,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
|
||||
@ -20008,7 +20008,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
bufferedwriter.write(String.format(Locale.ROOT, "block_entity_tickers: %d\n", this.blockEntityTickers.size()));
|
||||
bufferedwriter.write(String.format(Locale.ROOT, "block_ticks: %d\n", this.getBlockTicks().count()));
|
||||
bufferedwriter.write(String.format(Locale.ROOT, "fluid_ticks: %d\n", this.getFluidTicks().count()));
|
||||
@@ -1795,7 +2034,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1794,7 +2033,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
BufferedWriter bufferedwriter2 = Files.newBufferedWriter(path1);
|
||||
|
||||
try {
|
||||
@ -20017,7 +20017,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
} catch (Throwable throwable4) {
|
||||
if (bufferedwriter2 != null) {
|
||||
try {
|
||||
@@ -1816,7 +2055,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1815,7 +2054,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
BufferedWriter bufferedwriter3 = Files.newBufferedWriter(path2);
|
||||
|
||||
try {
|
||||
@ -20026,7 +20026,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
} catch (Throwable throwable6) {
|
||||
if (bufferedwriter3 != null) {
|
||||
try {
|
||||
@@ -1958,7 +2197,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1957,7 +2196,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@VisibleForTesting
|
||||
public String getWatchdogStats() {
|
||||
@ -20035,7 +20035,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString();
|
||||
}), this.blockEntityTickers.size(), ServerLevel.getTypeCount(this.blockEntityTickers, TickingBlockEntity::getType), this.getBlockTicks().count(), this.getFluidTicks().count(), this.gatherChunkSourceStats());
|
||||
}
|
||||
@@ -2018,15 +2257,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2017,15 +2256,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@Override
|
||||
public LevelEntityGetter<Entity> getEntities() {
|
||||
org.spigotmc.AsyncCatcher.catchOp("Chunk getEntities call"); // Spigot
|
||||
@ -20056,7 +20056,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
}
|
||||
|
||||
public void startTickingChunk(LevelChunk chunk) {
|
||||
@@ -2042,34 +2281,49 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2041,34 +2280,49 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
super.close();
|
||||
@ -20113,7 +20113,7 @@ index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0ff6e1f3f24b4086ce62faecf400c493
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2090,7 +2344,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2089,7 +2343,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
CrashReportCategory crashreportsystemdetails = super.fillReportDetails(report);
|
||||
|
||||
crashreportsystemdetails.setDetail("Loaded entity count", () -> {
|
||||
@ -21333,7 +21333,7 @@ index 846ae3fd184a1d63b743aa25e045604576697c96..a907b79fd8291a0e92db138f37239d17
|
||||
|
||||
public int getIndex() {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 42f29413d18b0df039736a87e4e5c1d15700f916..c2663fadd2c714b25fe411777ca9be957c3545df 100644
|
||||
index 17725dba7cbcdce00cd23c3956eaf1642d9c424f..6fb729809dffc1c0ab6957a127f8403df20aae96 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -83,6 +83,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -21344,7 +21344,7 @@ index 42f29413d18b0df039736a87e4e5c1d15700f916..c2663fadd2c714b25fe411777ca9be95
|
||||
|
||||
public LevelChunk(Level world, ChunkPos pos) {
|
||||
this(world, pos, UpgradeData.EMPTY, new LevelChunkTicks<>(), new LevelChunkTicks<>(), 0L, (LevelChunkSection[]) null, (LevelChunk.PostLoadProcessor) null, (BlendingData) null);
|
||||
@@ -657,9 +658,26 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -656,9 +657,26 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
}
|
||||
|
||||
@ -21374,7 +21374,7 @@ index 42f29413d18b0df039736a87e4e5c1d15700f916..c2663fadd2c714b25fe411777ca9be95
|
||||
int chunkX = this.chunkPos.x;
|
||||
int chunkZ = this.chunkPos.z;
|
||||
net.minecraft.server.level.ServerChunkCache chunkProvider = this.level.getChunkSource();
|
||||
@@ -674,10 +692,55 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -673,10 +691,55 @@ public class LevelChunk extends ChunkAccess {
|
||||
}
|
||||
}
|
||||
this.setNeighbourLoaded(0, 0, this);
|
||||
@ -21432,7 +21432,7 @@ index 42f29413d18b0df039736a87e4e5c1d15700f916..c2663fadd2c714b25fe411777ca9be95
|
||||
if (server != null) {
|
||||
/*
|
||||
* If it's a new world, the first few chunks are generated inside
|
||||
@@ -686,6 +749,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -685,6 +748,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
*/
|
||||
org.bukkit.Chunk bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
|
||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration));
|
||||
@ -21440,7 +21440,7 @@ index 42f29413d18b0df039736a87e4e5c1d15700f916..c2663fadd2c714b25fe411777ca9be95
|
||||
|
||||
if (this.needsDecoration) {
|
||||
try (co.aikar.timings.Timing ignored = this.level.timings.chunkLoadPopulate.startTiming()) { // Paper
|
||||
@@ -714,9 +778,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -713,9 +777,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
}
|
||||
|
||||
public void unloadCallback() {
|
||||
@ -21453,7 +21453,7 @@ index 42f29413d18b0df039736a87e4e5c1d15700f916..c2663fadd2c714b25fe411777ca9be95
|
||||
server.getPluginManager().callEvent(unloadEvent);
|
||||
// note: saving can be prevented, but not forced if no saving is actually required
|
||||
this.mustNotSave = !unloadEvent.isSaveChunk();
|
||||
@@ -738,9 +804,26 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -737,9 +803,26 @@ public class LevelChunk extends ChunkAccess {
|
||||
// Paper end
|
||||
}
|
||||
|
||||
@ -21481,7 +21481,7 @@ index 42f29413d18b0df039736a87e4e5c1d15700f916..c2663fadd2c714b25fe411777ca9be95
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -809,7 +892,9 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -808,7 +891,9 @@ public class LevelChunk extends ChunkAccess {
|
||||
return this.blockEntities;
|
||||
}
|
||||
|
||||
@ -21491,7 +21491,7 @@ index 42f29413d18b0df039736a87e4e5c1d15700f916..c2663fadd2c714b25fe411777ca9be95
|
||||
ChunkPos chunkcoordintpair = this.getPos();
|
||||
|
||||
for (int i = 0; i < this.postProcessing.length; ++i) {
|
||||
@@ -830,6 +915,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -829,6 +914,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
BlockState iblockdata1 = Block.updateFromNeighbourShapes(iblockdata, this.level, blockposition);
|
||||
|
||||
this.level.setBlock(blockposition, iblockdata1, 20);
|
||||
@ -21499,7 +21499,7 @@ index 42f29413d18b0df039736a87e4e5c1d15700f916..c2663fadd2c714b25fe411777ca9be95
|
||||
}
|
||||
}
|
||||
|
||||
@@ -847,6 +933,10 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -846,6 +932,10 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
this.pendingBlockEntities.clear();
|
||||
this.upgradeData.upgrade(this);
|
||||
@ -21510,7 +21510,7 @@ index 42f29413d18b0df039736a87e4e5c1d15700f916..c2663fadd2c714b25fe411777ca9be95
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -896,7 +986,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -895,7 +985,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
}
|
||||
|
||||
public FullChunkStatus getFullStatus() {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 0ff6e1f3f24b4086ce62faecf400c493f31fc964..7431b66079406a311a8e46ccabc8f3efa67f37e8 100644
|
||||
index c64448bec0dd18a49b2151c9e2ca528a65264031..88e9f55c50d2952df9c3b19cf95025c20ade9ffc 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2404,6 +2404,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2403,6 +2403,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
entity.inWorld = true; // CraftBukkit - Mark entity as in world
|
||||
entity.valid = true; // CraftBukkit
|
||||
|
@ -44,10 +44,10 @@ index b300d12e9e00519028b53aca9c3fb01f589eaa91..63acd109a79ed752a05df3d4f1b99309
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index c2663fadd2c714b25fe411777ca9be957c3545df..86bcebd778e5d51e1029b96048145622cd2811f3 100644
|
||||
index 6fb729809dffc1c0ab6957a127f8403df20aae96..db3ee1f1d8429d3d646623877adc9f6920b7764f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -1143,11 +1143,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1142,11 +1142,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
gameprofilerfiller.pop();
|
||||
} catch (Throwable throwable) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable thunder
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 7431b66079406a311a8e46ccabc8f3efa67f37e8..93b67b8cf9f2e290ffedba0ae85a3949e483442e 100644
|
||||
index 88e9f55c50d2952df9c3b19cf95025c20ade9ffc..11a829cc28e01f083c4669a8a28e377b96c3db0a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -847,7 +847,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -846,7 +846,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||
|
||||
gameprofilerfiller.push("thunder");
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Disable ice and snow
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 93b67b8cf9f2e290ffedba0ae85a3949e483442e..287af97463b780649f91065959898d7ced86c150 100644
|
||||
index 11a829cc28e01f083c4669a8a28e377b96c3db0a..f1b34765b436461f09e8b9122cb981e319684838 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -877,11 +877,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -876,11 +876,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
gameprofilerfiller.popPush("iceandsnow");
|
||||
|
||||
|
@ -131,7 +131,7 @@ index 5d65baba605dd83e5f74d526aeda36d8ede8c014..92e76dd39dc3575e9466031dd799080a
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 86bcebd778e5d51e1029b96048145622cd2811f3..c050a5d39087722dad6bb31f95b7b04fe7e8b767 100644
|
||||
index db3ee1f1d8429d3d646623877adc9f6920b7764f..b589b67471367f37e6d1f4737122914a649c01b3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -142,7 +142,7 @@ index 86bcebd778e5d51e1029b96048145622cd2811f3..c050a5d39087722dad6bb31f95b7b04f
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.UnmodifiableIterator;
|
||||
import com.mojang.logging.LogUtils;
|
||||
@@ -565,10 +566,16 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -564,10 +565,16 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
// CraftBukkit start
|
||||
} else {
|
||||
@ -163,7 +163,7 @@ index 86bcebd778e5d51e1029b96048145622cd2811f3..c050a5d39087722dad6bb31f95b7b04f
|
||||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
@@ -1146,6 +1153,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1145,6 +1152,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
|
||||
Methods that can be used for other patches to help improve logic.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 91683741c38cb9b9224c40a7637580bb4d15b075..88249c9a31e6dc1bb0912daebed80ede4d791d9f 100644
|
||||
index f1b34765b436461f09e8b9122cb981e319684838..68035b041157ddbfcbefbcc3a2a3e2a18c558c2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -223,7 +223,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -222,7 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
|
||||
@ -19,7 +19,7 @@ index 91683741c38cb9b9224c40a7637580bb4d15b075..88249c9a31e6dc1bb0912daebed80ede
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 5c42b38ab337a3fd4e4b4ac8d0aa2db43540446c..ed38ad96b9344903097962a5bf94fb861651fcba 100644
|
||||
index 9a39bf50668340a77bbfd45218c03d9c00a6ce1e..076caf94ff0b91b1c3d2b8a335e3d67f006e0c73 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -345,6 +345,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 82e1ef7c041c620741e9b714d73ced1a9cc76a67..119b317c75c4a6c6c600f2402dc9b28f62deab03 100644
|
||||
index 68035b041157ddbfcbefbcc3a2a3e2a18c558c2c..148d1a15e861a26c8fd49204f9bd9821f3cde2fd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -852,7 +852,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -851,7 +851,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
||||
|
@ -18,10 +18,10 @@ index e0a2759169f41b68b8e1bc48f0b323c0a4bc1fed..180bcaa2b5a74c527d8556301fb4a816
|
||||
this.profiler.push(() -> {
|
||||
return worldserver + " " + worldserver.dimension().location();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 30ae12f1d6abdaeaac070c54a22f0c869143745f..f9e9348a897d8f8bd5eb5bd951c6e2416e73562d 100644
|
||||
index 148d1a15e861a26c8fd49204f9bd9821f3cde2fd..f95d4fc714b98a86d732d16f0b783cd943ce0c15 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -221,6 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit start
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
@ -30,7 +30,7 @@ index 30ae12f1d6abdaeaac070c54a22f0c869143745f..f9e9348a897d8f8bd5eb5bd951c6e241
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
return this.chunkSource.getChunk(x, z, false);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index a589b70303bf66c41e6ea1dbf493d14304df25ab..9bb380e7c8973b4728b5d4aad663af9e477dda0c 100644
|
||||
index dce30af3c82d6fe13fa7edec451aedc6d1db9a34..866fa3107c52a3a6c8163140b0f90fb1f6520083 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -583,7 +583,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b854f430048f7e6531a9394fcb2e13ffc40f66bd..be98fe9934ec1b22c7b1c743bc137c805aea92e2 100644
|
||||
index f95d4fc714b98a86d732d16f0b783cd943ce0c15..ab55b028239f75b23a3e3fee10305a7896c2522b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2416,6 +2416,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2415,6 +2415,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
|
||||
}
|
||||
// Paper end
|
||||
@ -16,7 +16,7 @@ index b854f430048f7e6531a9394fcb2e13ffc40f66bd..be98fe9934ec1b22c7b1c743bc137c80
|
||||
}
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
@@ -2491,6 +2492,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2490,6 +2491,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index be98fe9934ec1b22c7b1c743bc137c805aea92e2..de95a2e79894c1552b28c8c4f6aa36fc26929098 100644
|
||||
index ab55b028239f75b23a3e3fee10305a7896c2522b..3379c481659b28671779f5434b31523941cb620e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1624,6 +1624,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1623,6 +1623,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
|
||||
|
@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
|
||||
Additionally, numerous issues to player position tracking on maps has been fixed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index de95a2e79894c1552b28c8c4f6aa36fc26929098..173ee629f92905e3905b4786905d976ed9e22978 100644
|
||||
index 3379c481659b28671779f5434b31523941cb620e..eb7c37da48b4b06d24f4f02132a5d5ac89de658b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2437,6 +2437,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2436,6 +2436,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
{
|
||||
if ( iter.next().player == entity )
|
||||
{
|
||||
|
@ -11,10 +11,10 @@ Co-authored-by: lexikiq <noellekiq@gmail.com>
|
||||
Co-authored-by: Aikar <aikar@aikar.co>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 173ee629f92905e3905b4786905d976ed9e22978..5847f0ace5b7adb631f1f71f36b78807c8ab8509 100644
|
||||
index eb7c37da48b4b06d24f4f02132a5d5ac89de658b..c63df0042b23e3728d5283b563889225691f6d56 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1558,7 +1558,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1557,7 +1557,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void levelEvent(@Nullable Player player, int eventId, BlockPos pos, int data) {
|
||||
|
@ -16,10 +16,10 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner
|
||||
public net.minecraft.world.entity.projectile.Projectile ownerUUID
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 5847f0ace5b7adb631f1f71f36b78807c8ab8509..7c1e5806d7b5e7dbb53050de24f5f6e668fa90f4 100644
|
||||
index c63df0042b23e3728d5283b563889225691f6d56..8afcd4e3a3805c7bccffaf6ff751e23101db6ed8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2369,6 +2369,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2368,6 +2368,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public void onTickingEnd(Entity entity) {
|
||||
ServerLevel.this.entityTickList.remove(entity);
|
||||
|
@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
|
||||
This adds a new Builder API which is much friendlier to use.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 7c1e5806d7b5e7dbb53050de24f5f6e668fa90f4..29044088ea933e2ba2c7f98d7a59c880a8d774fb 100644
|
||||
index 8afcd4e3a3805c7bccffaf6ff751e23101db6ed8..e96abf6afd434c104437e2461431f8b4c82c1d00 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1743,12 +1743,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1742,12 +1742,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
|
||||
|
@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
||||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 29044088ea933e2ba2c7f98d7a59c880a8d774fb..c7de5cd2cca4580ef7ff59763eae3c8d6eef209c 100644
|
||||
index e96abf6afd434c104437e2461431f8b4c82c1d00..e91ce13c4dbea719e567018ace8908d2c7b51b30 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1475,7 +1475,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1474,7 +1474,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
||||
if (tileentity instanceof net.minecraft.world.Container) {
|
||||
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) {
|
||||
@ -19,7 +19,7 @@ index 29044088ea933e2ba2c7f98d7a59c880a8d774fb..c7de5cd2cca4580ef7ff59763eae3c8d
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2460,7 +2460,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2459,7 +2459,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot Start
|
||||
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
||||
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
|
||||
|
@ -29,10 +29,10 @@ index c9e3e104cd051a38e367653dc6c4f969665fc250..45ee0cd242271883412284625230822d
|
||||
|
||||
protected void tick() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index c7de5cd2cca4580ef7ff59763eae3c8d6eef209c..98de2c14e146f862adc37fde428cf6c46d98d790 100644
|
||||
index e91ce13c4dbea719e567018ace8908d2c7b51b30..ea3b3652a560318a581f251732f47ec0fceed693 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -223,6 +223,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -222,6 +222,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper
|
||||
@ -42,7 +42,7 @@ index c7de5cd2cca4580ef7ff59763eae3c8d6eef209c..98de2c14e146f862adc37fde428cf6c4
|
||||
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
return this.chunkSource.getChunk(x, z, false);
|
||||
@@ -1437,7 +1440,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1436,7 +1439,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit start
|
||||
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
|
||||
@ -72,7 +72,7 @@ index c7de5cd2cca4580ef7ff59763eae3c8d6eef209c..98de2c14e146f862adc37fde428cf6c4
|
||||
return false;
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 17cae197f76e02491791c55554bd57592a30aa1d..7be66f8649d6f6cb67e3b42e8f4fe739f0ff9f9f 100644
|
||||
index 112f1d81ae21a28befbd4e09a40127a193796013..58e16b14548d5a8a476d3d71229627a83c59420e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -239,6 +239,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -7,12 +7,12 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData
|
||||
and cloning it when one is needed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index bf42cead5fa040d87da28d7be521b109724da19b..b4241ccdf972feec3dc2802ceafeef4f004c62d5 100644
|
||||
index a009fca54665cbc3f11cad776256fbf1fbbb18c7..2c7d025b2af3a66772c3f394620483045fb80242 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -876,6 +876,14 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
this.replaceable = blockbase_info.replaceable;
|
||||
this.conditionallyFullOpaque = this.isOpaque() & this.isTransparentOnSomeFaces(); // Paper
|
||||
this.conditionallyFullOpaque = this.canOcclude & this.useShapeForLightOcclusion; // Paper
|
||||
}
|
||||
+ // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time
|
||||
+ private org.bukkit.craftbukkit.block.data.CraftBlockData cachedCraftBlockData;
|
||||
|
@ -22,10 +22,10 @@ index 2eddeb8d5239bbfeefbf4d3bd363f1ad083299b6..a7c89cdf20cb63792c76de81c1ff9f2c
|
||||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 98de2c14e146f862adc37fde428cf6c46d98d790..9b687c6a134641dab0e60fe58372899a7f2945f5 100644
|
||||
index ea3b3652a560318a581f251732f47ec0fceed693..9634efd5e5ef45c905de4af05ee341b6c88a879b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1455,6 +1455,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1454,6 +1454,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return true;
|
||||
}
|
||||
// Paper end
|
||||
@ -59,7 +59,7 @@ index 18dc5ef7892c24f4071c8c0621ac412a5d8767bd..c98e4469fa8940762c26a8d787bfabe4
|
||||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index fa24d236ed330b417306f137d441bb08dc79a3f5..5397d84d790c32d369b0726db16571348285d8fb 100644
|
||||
index f0179182df5a716860c9d9f211415dccd6313b92..bbc16fbf403f7722c3d15eb8d63f9abd5e973bfd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -235,6 +235,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -63,10 +63,10 @@ index af90bb579429336cc4e99386fd620c898c23d274..96fd66ed2742a79064852af6e936830d
|
||||
// this.updateMobSpawningFlags();
|
||||
worldserver.setSpawnSettings(this.isSpawningMonsters(), this.isSpawningAnimals());
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 9b687c6a134641dab0e60fe58372899a7f2945f5..1867dffd8bdfa1ffb070f90ca76b4c7c74de9352 100644
|
||||
index 9634efd5e5ef45c905de4af05ee341b6c88a879b..5faaa29ea1e594c9e42e2a0c396ca0a40137119e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1898,12 +1898,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1897,12 +1897,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return ((MapIndex) this.getServer().overworld().getDataStorage().computeIfAbsent(MapIndex.factory(), "idcounts")).getFreeAuxValueForMap();
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID
|
||||
Use the PlayerList map instead of iterating over all players
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1867dffd8bdfa1ffb070f90ca76b4c7c74de9352..86f2d1c6298a08968febf1bfd5073ac386c0a998 100644
|
||||
index 5faaa29ea1e594c9e42e2a0c396ca0a40137119e..29a6c17103b443af83cf1506a0d1cfc328028270 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -559,6 +559,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -558,6 +558,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ public net.minecraft.world.entity.Entity isInsidePortal
|
||||
public net.minecraft.world.entity.LivingEntity jumping
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 86f2d1c6298a08968febf1bfd5073ac386c0a998..e147ec8eeb69668da8eb52550c39623f700c2052 100644
|
||||
index 29a6c17103b443af83cf1506a0d1cfc328028270..feff680a737640f33f6efd9f0e2705e4a01ea7bb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2,7 +2,6 @@ package net.minecraft.server.level;
|
||||
@ -29,7 +29,7 @@ index 86f2d1c6298a08968febf1bfd5073ac386c0a998..e147ec8eeb69668da8eb52550c39623f
|
||||
import com.google.common.collect.Lists;
|
||||
import com.mojang.datafixers.DataFixer;
|
||||
import com.mojang.datafixers.util.Pair;
|
||||
@@ -1212,17 +1211,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1211,17 +1210,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
++TimingHistory.entityTicks; // Paper - timings
|
||||
// Spigot start
|
||||
co.aikar.timings.Timing timer; // Paper
|
||||
@ -51,7 +51,7 @@ index 86f2d1c6298a08968febf1bfd5073ac386c0a998..e147ec8eeb69668da8eb52550c39623f
|
||||
try {
|
||||
// Paper end - timings
|
||||
entity.setOldPosAndRot();
|
||||
@@ -1233,9 +1232,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1232,9 +1231,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString();
|
||||
});
|
||||
gameprofilerfiller.incrementCounter("tickNonPassenger");
|
||||
@ -65,7 +65,7 @@ index 86f2d1c6298a08968febf1bfd5073ac386c0a998..e147ec8eeb69668da8eb52550c39623f
|
||||
Iterator iterator = entity.getPassengers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1243,13 +1246,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1242,13 +1245,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
this.tickPassenger(entity, entity1);
|
||||
}
|
||||
@ -85,7 +85,7 @@ index 86f2d1c6298a08968febf1bfd5073ac386c0a998..e147ec8eeb69668da8eb52550c39623f
|
||||
passenger.setOldPosAndRot();
|
||||
++passenger.tickCount;
|
||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||
@@ -1258,8 +1266,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1257,8 +1265,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return BuiltInRegistries.ENTITY_TYPE.getKey(passenger.getType()).toString();
|
||||
});
|
||||
gameprofilerfiller.incrementCounter("tickPassenger");
|
||||
@ -103,7 +103,7 @@ index 86f2d1c6298a08968febf1bfd5073ac386c0a998..e147ec8eeb69668da8eb52550c39623f
|
||||
gameprofilerfiller.pop();
|
||||
Iterator iterator = passenger.getPassengers().iterator();
|
||||
|
||||
@@ -1269,6 +1286,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1268,6 +1285,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.tickPassenger(passenger, entity2);
|
||||
}
|
||||
|
||||
@ -112,7 +112,7 @@ index 86f2d1c6298a08968febf1bfd5073ac386c0a998..e147ec8eeb69668da8eb52550c39623f
|
||||
} else {
|
||||
passenger.stopRiding();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 5397d84d790c32d369b0726db16571348285d8fb..b65c8b48c3a3dd71cb5945dca104cc67a1f2ce6d 100644
|
||||
index bbc16fbf403f7722c3d15eb8d63f9abd5e973bfd..dfaba87aa2cfb7687acaa0472c2370a2c4cefbc5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -395,6 +395,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -348,7 +348,7 @@ index b149e8bcac034bb3fc118a9adcb0de45e18ed5e9..fc35cfc9d045f3e5b6a50af1d0ba83b6
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index f131fdd758c42da3be15b6cd6334c50c01ab407c..e4c0e0eb3ee268c82019fbebe11008373e8148a0 100644
|
||||
index 7366bef851d283b30401c8be7057f01d703e486e..8c4fcb49c1cd90751bcc776a119f4d503b2bbf06 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -163,6 +163,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -1104,10 +1104,10 @@ index be89e5b8c1ea7f85aef267a15986affa5fa1fd4b..43472855136f26b282d94fd241853d86
|
||||
|
||||
public ClientboundLevelChunkWithLightPacket(FriendlyByteBuf buf) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index e147ec8eeb69668da8eb52550c39623f700c2052..2a6ac42a2b7388dcbd405fb00b05067b8b5a78cb 100644
|
||||
index feff680a737640f33f6efd9f0e2705e4a01ea7bb..bfbac715787bc75f77cfd3047f67613e56d7e64b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -573,7 +573,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -572,7 +572,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
||||
|
||||
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
||||
@ -1155,7 +1155,7 @@ index 5de5209e04d631bd6a50e28e8d3abebf148252c1..19b3f4fa7678a038bf25efc2a8b46dda
|
||||
DebugPackets.sendPoiPacketsForChunk(world, chunkPos);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index e4c0e0eb3ee268c82019fbebe11008373e8148a0..5d344f88e5e5ff73ae29833952fc2df80473ced6 100644
|
||||
index 8c4fcb49c1cd90751bcc776a119f4d503b2bbf06..864b1985ba645b709e2cb5e7fd036e7664063ce5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -178,6 +178,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@ -1217,7 +1217,7 @@ index 5e8d2e4245757a0889645ea79ee68afb53f7dde4..f7e5e016a7028a9196e689e950805b0d
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index d9d2bf31a0e7ad374aa62197c71626a1abfbaf71..4a5491a79281b7cddf5ad5f060567f174b89d14b 100644
|
||||
index 86eff98a4f73fc1eb1f5f977204aa9307aa54013..e599bfb9a7b0b85bea2940f6bf55118305dd0ce8 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -91,7 +91,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
@ -312,10 +312,10 @@ index 4039bd5a80bd2305082d21c0fe826f76d8beb4c4..974b4970be214ca36a801d39932abcc7
|
||||
chunkproviderserver_b.managedBlock(completablefuture::isDone);
|
||||
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.popChunkWait(); // Paper - async chunk debug // Paper - rewrite chunk system
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 2a6ac42a2b7388dcbd405fb00b05067b8b5a78cb..6a2ced4ff900f07833400926333fee527fac1074 100644
|
||||
index bfbac715787bc75f77cfd3047f67613e56d7e64b..2480f05dd9ecb2d68ccf193354872ae8cb4009f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -652,6 +652,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -651,6 +651,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.entityLookup = new io.papermc.paper.chunk.system.entity.EntityLookup(this, new EntityCallbacks()); // Paper - rewrite chunk system
|
||||
}
|
||||
|
||||
|
@ -25,10 +25,10 @@ index 1f9efff4ddccf2569fdfe42e6cbc92792643d0ea..876200db872bce89976329c4d6c6fbe9
|
||||
EntityType<?> entitytypes = entity.getType();
|
||||
int i = entitytypes.clientTrackingRange() * 16;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 6a2ced4ff900f07833400926333fee527fac1074..1e54396f42737f18d6b3cef7d0c208ec03088b73 100644
|
||||
index 2480f05dd9ecb2d68ccf193354872ae8cb4009f3..bd40d4056fbf237f2a3f6c7178bed699f9bdf389 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2515,7 +2515,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2514,7 +2514,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
public void onTrackingStart(Entity entity) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
|
||||
@ -37,7 +37,7 @@ index 6a2ced4ff900f07833400926333fee527fac1074..1e54396f42737f18d6b3cef7d0c208ec
|
||||
if (entity instanceof ServerPlayer) {
|
||||
ServerPlayer entityplayer = (ServerPlayer) entity;
|
||||
|
||||
@@ -2550,6 +2550,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2549,6 +2549,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
entity.inWorld = true; // CraftBukkit - Mark entity as in world
|
||||
entity.valid = true; // CraftBukkit
|
||||
|
@ -296,7 +296,7 @@ index f5829ae484d93b547a5437b85a9621346384a11b..83701fbfaa56a232593ee8f11a3afb89
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 571019880cd9f22f347ac8fca663728b6706912d..7d213ebc6a3d9dc15468a6cfb472306121c3ca15 100644
|
||||
index 864b1985ba645b709e2cb5e7fd036e7664063ce5..9c798dc5fc321697cea669d4656460e4971a92b5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -913,6 +913,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@ -308,10 +308,10 @@ index 571019880cd9f22f347ac8fca663728b6706912d..7d213ebc6a3d9dc15468a6cfb4723061
|
||||
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
|
||||
MinecraftServer.LOGGER.error(msg, throwable);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 12834995b2bab9e82a40feb01f038532961296cf..12af77215bfd6df3b6802a567ac3c013a4cdf06a 100644
|
||||
index 3acef646275aa05100e13e149bc5ff6d1ccbbea8..45ecda3b67025881a145d40a5291c34e5a1f9590 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -1177,6 +1177,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1176,6 +1176,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
|
||||
gameprofilerfiller.pop();
|
||||
} catch (Throwable throwable) {
|
||||
|
@ -557,10 +557,10 @@ index fe47a38137f7b7fa94c507e790eec4fb7303595f..7f5ecea0ee78a534d7c56fa9e3ad2117
|
||||
paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
|
||||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1e54396f42737f18d6b3cef7d0c208ec03088b73..f734f6476c89bbed511d0b8209bd1cbdbd791998 100644
|
||||
index bd40d4056fbf237f2a3f6c7178bed699f9bdf389..2e04cf910a520b92ac43a5ff2d06d9d61402c3cb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -223,7 +223,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -222,7 +222,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper
|
||||
public static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||
@ -571,7 +571,7 @@ index 1e54396f42737f18d6b3cef7d0c208ec03088b73..f734f6476c89bbed511d0b8209bd1cbd
|
||||
}
|
||||
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
@@ -1493,7 +1495,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1492,7 +1494,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (entity.isRemoved()) {
|
||||
// Paper start
|
||||
if (DEBUG_ENTITIES) {
|
||||
@ -633,10 +633,10 @@ index 6a64c58fff9bbed542bf29a029531996f2a50d00..c24898f8e81e8ab9a1f90bf4439ea6c6
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 12af77215bfd6df3b6802a567ac3c013a4cdf06a..fa170cc1ce7011d201295b89718292d696c7fc24 100644
|
||||
index 45ecda3b67025881a145d40a5291c34e5a1f9590..27e8ee4507460b1cc72de692b41562b9f4f13929 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -600,7 +600,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -599,7 +599,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
+ " (" + getBlockState(blockposition) + ") where there was no entity tile!\n" +
|
||||
"Chunk coordinates: " + (this.chunkPos.x * 16) + "," + (this.chunkPos.z * 16) +
|
||||
"\nWorld: " + level.getLevel().dimension().location());
|
||||
|
@ -76,10 +76,10 @@ index 974b4970be214ca36a801d39932abcc751e540a5..63fad53a9184d7ab97f143b7d85ae9ef
|
||||
public void close() throws IOException {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index f734f6476c89bbed511d0b8209bd1cbdbd791998..9924f0ba2ac867748e49d738ac5bcef292cfc649 100644
|
||||
index 2e04cf910a520b92ac43a5ff2d06d9d61402c3cb..206aa969d1ea8831f4c30be11ab26ecd31fd433e 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1307,6 +1307,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1306,6 +1306,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return !this.server.isUnderSpawnProtection(this, pos, player) && this.getWorldBorder().isWithinBounds(pos);
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 9924f0ba2ac867748e49d738ac5bcef292cfc649..4e37b64f608b9a4c6d421fc685680f7bd2269bb1 100644
|
||||
index 206aa969d1ea8831f4c30be11ab26ecd31fd433e..08c4b6e02c257cfbdaa0da6d65e531d4ed7be122 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2035,9 +2035,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2034,9 +2034,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public void setDefaultSpawnPos(BlockPos pos, float angle) {
|
||||
// Paper - configurable spawn radius
|
||||
BlockPos prevSpawn = this.getSharedSpawnPos();
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 4e37b64f608b9a4c6d421fc685680f7bd2269bb1..6a05779c83a77e16bf53b6e2378e3cb08851ed5d 100644
|
||||
index 08c4b6e02c257cfbdaa0da6d65e531d4ed7be122..5bd212dcf32fcf3ad5c3dafbd3d413755a8cd934 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1533,6 +1533,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1532,6 +1532,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
} else {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 6a05779c83a77e16bf53b6e2378e3cb08851ed5d..f1d441758874f76ecde4275bdc721cb927754542 100644
|
||||
index 5bd212dcf32fcf3ad5c3dafbd3d413755a8cd934..9ad59776ad035b8f6069f5df1fda174002ef58d1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2104,6 +2104,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2103,6 +2103,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
});
|
||||
optional1.ifPresent((holder) -> {
|
||||
this.getServer().execute(() -> {
|
||||
|
@ -17,10 +17,10 @@ index c063dece36e110691297b38635a9d14d70c4e391..5f440e3d3a750c65d0d13834eca553b8
|
||||
this.profiler.push(() -> {
|
||||
return worldserver + " " + worldserver.dimension().location();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 7b97230bfffd6cac128330cdfe451a62f0427a11..e411fe6e0e1495c417bb8938bf6bd42b7ac63f18 100644
|
||||
index 9ad59776ad035b8f6069f5df1fda174002ef58d1..c5fc4d510ebdc1308759be9f6ac79dfff9c69895 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -221,6 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper
|
||||
@ -29,7 +29,7 @@ index 7b97230bfffd6cac128330cdfe451a62f0427a11..e411fe6e0e1495c417bb8938bf6bd42b
|
||||
final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date());
|
||||
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index bf617621c88c68198709d1ed238622c3fcec89bd..e112880d8389c059a5daa572cb7906d767279084 100644
|
||||
index 7d72477cdeaa8238da1291c0a902d090463b95c8..51916ff6f45090cf5e2da6b12640c130533fc4d9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3361,6 +3361,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 18aabf214ab5ffef94c71dfe1a7f1ee361a020ec..cea93f8edc6c7b03da421663fe3d9933040e3439 100644
|
||||
index c5fc4d510ebdc1308759be9f6ac79dfff9c69895..7b1374c8ee66c58fe6bd25173966d62e8971e3e4 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1678,6 +1678,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1677,6 +1677,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
this.getChunkSource().blockChanged(pos);
|
||||
@ -16,7 +16,7 @@ index 18aabf214ab5ffef94c71dfe1a7f1ee361a020ec..cea93f8edc6c7b03da421663fe3d9933
|
||||
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
|
||||
VoxelShape voxelshape1 = newState.getCollisionShape(this, pos);
|
||||
|
||||
@@ -1719,6 +1720,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1718,6 +1719,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index cea93f8edc6c7b03da421663fe3d9933040e3439..a53edd823643d53e45e5376a6a5300804430e7c2 100644
|
||||
index 7b1374c8ee66c58fe6bd25173966d62e8971e3e4..e00fe39fbcd4aa54eb498b91783b7e4dd021acc0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -673,8 +673,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -672,8 +672,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.serverLevelData.setClearWeatherTime(clearDuration);
|
||||
this.serverLevelData.setRainTime(rainDuration);
|
||||
this.serverLevelData.setThunderTime(rainDuration);
|
||||
@ -19,7 +19,7 @@ index cea93f8edc6c7b03da421663fe3d9933040e3439..a53edd823643d53e45e5376a6a530080
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1110,8 +1110,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1109,8 +1109,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.serverLevelData.setThunderTime(j);
|
||||
this.serverLevelData.setRainTime(k);
|
||||
this.serverLevelData.setClearWeatherTime(i);
|
||||
@ -30,7 +30,7 @@ index cea93f8edc6c7b03da421663fe3d9933040e3439..a53edd823643d53e45e5376a6a530080
|
||||
}
|
||||
|
||||
this.oThunderLevel = this.thunderLevel;
|
||||
@@ -1178,14 +1178,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1177,14 +1177,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@VisibleForTesting
|
||||
public void resetWeatherCycle() {
|
||||
// CraftBukkit start
|
||||
|
@ -8,10 +8,10 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk
|
||||
load in that case).
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 08fee3d75a9f7ae950698a6ca8f18917ab0e3b21..107e2b2a159838301e173323df1747954a52b104 100644
|
||||
index e00fe39fbcd4aa54eb498b91783b7e4dd021acc0..89396f956fc413f6ce53c2f66a85c395557aa883 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -230,7 +230,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -229,7 +229,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
@ -21,7 +21,7 @@ index 08fee3d75a9f7ae950698a6ca8f18917ab0e3b21..107e2b2a159838301e173323df174795
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index befd147f604bf9cf881893580436bbf8fbead86d..031fe212e5bc28ac675f835bec37c1bca3c5351f 100644
|
||||
index da6995bcecfb16567b8a7c13b19d08ef3e5dc5d2..06446b61b79c24bb1df194706a587597a31e5a49 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -204,6 +204,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes
|
||||
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b87def2d484f014a4c20bdd75cd48611e08f0426..76c8e4083bc89c78725dde0984efdf959c4b5e92 100644
|
||||
index 89396f956fc413f6ce53c2f66a85c395557aa883..0830f7671ade925e0b89b2723cef9f43d4f20922 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -999,6 +999,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -998,6 +998,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
protected BlockPos findLightningTargetAround(BlockPos pos) {
|
||||
@ -22,7 +22,7 @@ index b87def2d484f014a4c20bdd75cd48611e08f0426..76c8e4083bc89c78725dde0984efdf95
|
||||
BlockPos blockposition1 = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, pos);
|
||||
Optional<BlockPos> optional = this.findLightningRod(blockposition1);
|
||||
|
||||
@@ -1013,6 +1018,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1012,6 +1017,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (!list.isEmpty()) {
|
||||
return ((LivingEntity) list.get(this.random.nextInt(list.size()))).blockPosition();
|
||||
} else {
|
||||
|
@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/
|
||||
state desync POV because the TE is getting unloaded anyways.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 76c8e4083bc89c78725dde0984efdf959c4b5e92..a885b90a44066103133af953d56bb3dbb9b899be 100644
|
||||
index 0830f7671ade925e0b89b2723cef9f43d4f20922..5329fe64b64fab73d3bda02c700a6f01aa2d9637 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1579,9 +1579,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1578,9 +1578,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot Start
|
||||
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
|
||||
if (tileentity instanceof net.minecraft.world.Container) {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Manually inline methods in BlockPosition
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
index 441ea6b9fd55a5288f264472d7297728d0546d6b..83cab746d1d6fe25c043c8aee28c39412b90c127 100644
|
||||
index e5dfc4009cb06e500c6b54ee4228117061758b53..c47aa87db42dea74a2e07ffe6015257fa337da23 100644
|
||||
--- a/src/main/java/net/minecraft/core/BlockPos.java
|
||||
+++ b/src/main/java/net/minecraft/core/BlockPos.java
|
||||
@@ -515,9 +515,9 @@ public class BlockPos extends Vec3i {
|
||||
@ -21,8 +21,8 @@ index 441ea6b9fd55a5288f264472d7297728d0546d6b..83cab746d1d6fe25c043c8aee28c3941
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -581,19 +581,19 @@ public class BlockPos extends Vec3i {
|
||||
// Paper start - comment out useless overrides @Override - TODO figure out why this is suddenly important to keep
|
||||
@@ -580,19 +580,19 @@ public class BlockPos extends Vec3i {
|
||||
|
||||
@Override
|
||||
public BlockPos.MutableBlockPos setX(int i) {
|
||||
- super.setX(i);
|
||||
@ -43,7 +43,7 @@ index 441ea6b9fd55a5288f264472d7297728d0546d6b..83cab746d1d6fe25c043c8aee28c3941
|
||||
+ this.z = i; // Paper
|
||||
return this;
|
||||
}
|
||||
// Paper end
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java
|
||||
index e87ef99260bff134529e00b9a75381cecaec01a4..74a3f2ba6aaec39ba4721fb546bfccb325c86343 100644
|
||||
--- a/src/main/java/net/minecraft/core/Vec3i.java
|
||||
|
@ -123,10 +123,10 @@ index 63fad53a9184d7ab97f143b7d85ae9ef2ca9f8bc..1483007b79e18107e41037c279e048f0
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index a885b90a44066103133af953d56bb3dbb9b899be..2c759854ed9f78c48c4e9ed2dc72e5a5693bd712 100644
|
||||
index 5329fe64b64fab73d3bda02c700a6f01aa2d9637..4df6c879aae57cb85c67a0c7342fc33db6f180dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -217,6 +217,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -216,6 +216,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
private final StructureCheck structureCheck;
|
||||
private final boolean tickTime;
|
||||
private final RandomSequences randomSequences;
|
||||
@ -134,7 +134,7 @@ index a885b90a44066103133af953d56bb3dbb9b899be..2c759854ed9f78c48c4e9ed2dc72e5a5
|
||||
|
||||
// CraftBukkit start
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
@@ -1211,6 +1212,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1210,6 +1211,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (fluid1.is(fluid)) {
|
||||
fluid1.tick(this, pos);
|
||||
}
|
||||
@ -142,7 +142,7 @@ index a885b90a44066103133af953d56bb3dbb9b899be..2c759854ed9f78c48c4e9ed2dc72e5a5
|
||||
|
||||
}
|
||||
|
||||
@@ -1220,6 +1222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1219,6 +1221,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (iblockdata.is(block)) {
|
||||
iblockdata.tick(this, pos, this.random);
|
||||
}
|
||||
@ -151,7 +151,7 @@ index a885b90a44066103133af953d56bb3dbb9b899be..2c759854ed9f78c48c4e9ed2dc72e5a5
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 73d3eff15c3faea7716beb5b53d66af434005d0f..cddac4571578ac8d647f3f4b20fb6f7b773aabe3 100644
|
||||
index b0a05a1a5129af0f5c11139a6fb7acd08ee3eb0e..43f43c59138b661299f20cba89d91aa5585cdf32 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -927,6 +927,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -90,10 +90,10 @@ index 0000000000000000000000000000000000000000..7d93652c1abbb6aee6eb7c26cf35d4d0
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 2c759854ed9f78c48c4e9ed2dc72e5a5693bd712..5e5b840301bf7021ce2776f49732f608330894eb 100644
|
||||
index 4df6c879aae57cb85c67a0c7342fc33db6f180dc..bc826660514a76738f5256bf571eb2abf8bf85ef 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -861,6 +861,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -860,6 +860,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entityplayer.stopSleepInBed(false, false);
|
||||
});
|
||||
}
|
||||
@ -104,7 +104,7 @@ index 2c759854ed9f78c48c4e9ed2dc72e5a5693bd712..5e5b840301bf7021ce2776f49732f608
|
||||
|
||||
public void tickChunk(LevelChunk chunk, int randomTickSpeed) {
|
||||
ChunkPos chunkcoordintpair = chunk.getPos();
|
||||
@@ -870,8 +874,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -869,8 +873,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
ProfilerFiller gameprofilerfiller = this.getProfiler();
|
||||
|
||||
gameprofilerfiller.push("thunder");
|
||||
@ -116,7 +116,7 @@ index 2c759854ed9f78c48c4e9ed2dc72e5a5693bd712..5e5b840301bf7021ce2776f49732f608
|
||||
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
||||
@@ -903,7 +909,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -902,7 +908,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (!this.paperConfig().environment.disableIceAndSnow) { // Paper
|
||||
for (int l = 0; l < randomTickSpeed; ++l) {
|
||||
if (this.random.nextInt(48) == 0) {
|
||||
@ -128,7 +128,7 @@ index 2c759854ed9f78c48c4e9ed2dc72e5a5693bd712..5e5b840301bf7021ce2776f49732f608
|
||||
}
|
||||
}
|
||||
} // Paper
|
||||
@@ -911,36 +920,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -910,36 +919,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
gameprofilerfiller.popPush("tickBlocks");
|
||||
timings.chunkTicksBlocks.startTiming(); // Paper
|
||||
if (randomTickSpeed > 0) {
|
||||
@ -190,7 +190,7 @@ index 2c759854ed9f78c48c4e9ed2dc72e5a5693bd712..5e5b840301bf7021ce2776f49732f608
|
||||
|
||||
timings.chunkTicksBlocks.stopTiming(); // Paper
|
||||
gameprofilerfiller.pop();
|
||||
@@ -948,17 +958,25 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -947,17 +957,25 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@VisibleForTesting
|
||||
public void tickPrecipitation(BlockPos pos) {
|
||||
@ -220,7 +220,7 @@ index 2c759854ed9f78c48c4e9ed2dc72e5a5693bd712..5e5b840301bf7021ce2776f49732f608
|
||||
if (i > 0 && biomebase.shouldSnow(this, blockposition1)) {
|
||||
BlockState iblockdata = this.getBlockState(blockposition1);
|
||||
|
||||
@@ -976,12 +994,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -975,12 +993,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,7 +324,7 @@ index 722e323d2ae3f4ac8aa3197fed79f7d926d5ccfa..f8c1dfc8e121a406955348a1ec00c264
|
||||
|
||||
public BlockPos getHomePos() {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 17b7f100979042ef33e18ab930a0935e4cfaa674..c438c75b8edfbb8d728b01a96882e6cd802a3bea 100644
|
||||
index 43f43c59138b661299f20cba89d91aa5585cdf32..3b13a13c4e7de12ed0cac354701bf3502d788b59 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1398,10 +1398,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -76,10 +76,10 @@ index 7de24c39b460e43d27839b3821e67213508ece81..7297bca9224c12d7ace0e1967340d994
|
||||
});
|
||||
throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 5e5b840301bf7021ce2776f49732f608330894eb..681faafdeb4b7d7d8b2078fbc0fc6067838ab1c9 100644
|
||||
index bc826660514a76738f5256bf571eb2abf8bf85ef..53ab0a55cef95bf7660ccf68558967ce9b63c741 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1245,7 +1245,26 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1244,7 +1244,26 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ index 5e5b840301bf7021ce2776f49732f608330894eb..681faafdeb4b7d7d8b2078fbc0fc6067
|
||||
++TimingHistory.entityTicks; // Paper - timings
|
||||
// Spigot start
|
||||
co.aikar.timings.Timing timer; // Paper
|
||||
@@ -1285,7 +1304,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1284,7 +1303,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.tickPassenger(entity, entity1);
|
||||
}
|
||||
// } finally { timer.stopTiming(); } // Paper - timings - move up
|
||||
@ -122,7 +122,7 @@ index 5e5b840301bf7021ce2776f49732f608330894eb..681faafdeb4b7d7d8b2078fbc0fc6067
|
||||
|
||||
private void tickPassenger(Entity vehicle, Entity passenger) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 65ab99c3f3f1478db6e14d713e82346d3ecc06a5..1aac748a6ac485ad66f4501ae22cd6a422a966b5 100644
|
||||
index 70f3def7c659ff2b44ddcbdccfba8bbdf835c160..bcc6d2cf3300d2e6eadadbcc03dc5aaaf2b5d7e3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1029,7 +1029,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 681faafdeb4b7d7d8b2078fbc0fc6067838ab1c9..0d18158174966245b679954f5a9268c6aac4be32 100644
|
||||
index 53ab0a55cef95bf7660ccf68558967ce9b63c741..15533cf984bc29edc8015f0cc6b1d510c672c896 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2697,6 +2697,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2696,6 +2696,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// Spigot end
|
||||
// Spigot Start
|
||||
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
|
||||
|
@ -3018,13 +3018,13 @@ index 142f9438f75cb7e2d97011fdeb3f9e367ff81599..38d587c93a9ae5706633608f681f1868
|
||||
|
||||
public boolean propagatesSkylightDown(BlockState state, BlockGetter world, BlockPos pos) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index 31dc96c371953eb7ca3d3b444b123ade1f24c909..84d7aeafafe1497d96dca2238b579007cbe27146 100644
|
||||
index fb46c66d916931fd80a99c59030ca05e12d29953..d91a82428a435a65bc55ad466ccebe91e0d905e0 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -882,6 +882,10 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
this.instrument = blockbase_info.instrument;
|
||||
this.replaceable = blockbase_info.replaceable;
|
||||
this.conditionallyFullOpaque = this.isOpaque() & this.isTransparentOnSomeFaces(); // Paper
|
||||
this.conditionallyFullOpaque = this.canOcclude & this.useShapeForLightOcclusion; // Paper
|
||||
+ // Paper start - optimise collisions
|
||||
+ this.id1 = it.unimi.dsi.fastutil.HashCommon.murmurHash3(it.unimi.dsi.fastutil.HashCommon.murmurHash3(ID_GENERATOR.getAndIncrement() + RANDOM_OFFSET) + RANDOM_OFFSET);
|
||||
+ this.id2 = it.unimi.dsi.fastutil.HashCommon.murmurHash3(it.unimi.dsi.fastutil.HashCommon.murmurHash3(ID_GENERATOR.getAndIncrement() + RANDOM_OFFSET) + RANDOM_OFFSET);
|
||||
|
@ -23,10 +23,10 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af97115157147
|
||||
}
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 0d18158174966245b679954f5a9268c6aac4be32..9e0fb3a13cd4ae0142e3e63995b7eac61e48eea6 100644
|
||||
index 15533cf984bc29edc8015f0cc6b1d510c672c896..f5a32aaae5b4eb6dda3da3d5d39f38e000e806c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2606,6 +2606,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2605,6 +2605,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
|
||||
public void onTickingStart(Entity entity) {
|
||||
|
@ -2008,10 +2008,10 @@ index 0000000000000000000000000000000000000000..33cd90c30c22200a4e1ae64f40a0bf78
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 9e0fb3a13cd4ae0142e3e63995b7eac61e48eea6..8587f35706daf5a317035d0f7acee0b350984aab 100644
|
||||
index f5a32aaae5b4eb6dda3da3d5d39f38e000e806c2..6015033919cab9127785b9e30c30b9e8d086c867 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -224,6 +224,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -223,6 +223,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper
|
||||
public boolean hasEntityMoveEvent = false; // Paper
|
||||
@ -2019,7 +2019,7 @@ index 9e0fb3a13cd4ae0142e3e63995b7eac61e48eea6..8587f35706daf5a317035d0f7acee0b3
|
||||
public static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||
final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date());
|
||||
io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr);
|
||||
@@ -2595,6 +2596,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2594,6 +2595,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return crashreportsystemdetails;
|
||||
}
|
||||
|
||||
|
@ -7,10 +7,10 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca
|
||||
Just simply prevent them from being added to the world instead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 8587f35706daf5a317035d0f7acee0b350984aab..289b482e1e3e5824c4deadee89e39b2617f5068e 100644
|
||||
index 6015033919cab9127785b9e30c30b9e8d086c867..d23c376b2421c8f94e5729d62beff93ce9c3b53c 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1588,6 +1588,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1587,6 +1587,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
} else {
|
||||
|
@ -124,10 +124,10 @@ index a0603e567deeede8b4cd2ba57ded44f29239d78d..982750fd4f3f474514194df9b7638831
|
||||
return this.anyPlayerCloseEnoughForSpawning(pos, false);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 289b482e1e3e5824c4deadee89e39b2617f5068e..6e246868a395eb872d3e2680753c4584c98fdd15 100644
|
||||
index d23c376b2421c8f94e5729d62beff93ce9c3b53c..742d7146c2a6d364de15b18caacc2ca6a4355f9b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1033,7 +1033,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1032,7 +1032,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
} else {
|
||||
AABB axisalignedbb = AABB.encapsulatingFullBlocks(blockposition1, new BlockPos(blockposition1.atY(this.getMaxBuildHeight()))).inflate(3.0D);
|
||||
List<LivingEntity> list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 6e246868a395eb872d3e2680753c4584c98fdd15..88deea3a8b90148b014730d9186526725b5991bb 100644
|
||||
index 742d7146c2a6d364de15b18caacc2ca6a4355f9b..269444c5a4c73ebd21982bbe8f6dd8390cd8c98b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2642,7 +2642,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2641,7 +2641,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (entity instanceof Mob) {
|
||||
Mob entityinsentient = (Mob) entity;
|
||||
|
||||
@ -17,7 +17,7 @@ index 6e246868a395eb872d3e2680753c4584c98fdd15..88deea3a8b90148b014730d918652672
|
||||
String s = "onTrackingStart called during navigation iteration";
|
||||
|
||||
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
|
||||
@@ -2728,7 +2728,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2727,7 +2727,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (entity instanceof Mob) {
|
||||
Mob entityinsentient = (Mob) entity;
|
||||
|
||||
|
@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player
|
||||
instead of just checking players in their world.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 88deea3a8b90148b014730d9186526725b5991bb..412ce6611f88c10fb374fdbae9748cceae689308 100644
|
||||
index 269444c5a4c73ebd21982bbe8f6dd8390cd8c98b..93bd05adb8dcc1dae81b820e262bc1fb43430981 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2765,4 +2765,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2764,4 +2764,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::move);
|
||||
}
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 412ce6611f88c10fb374fdbae9748cceae689308..c17d8e00cd43f2f969c81be2ee65fab2b8578eae 100644
|
||||
index 93bd05adb8dcc1dae81b820e262bc1fb43430981..abef96d4c0ee22d05fc8b462811189128900fb8d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1725,6 +1725,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1724,6 +1724,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void gameEvent(GameEvent event, Vec3 emitterPos, GameEvent.Context emitter) {
|
||||
|
@ -30,10 +30,10 @@ index a8f9f4e23575cb58045f9d8efe011a60a51dbd7a..34f19ac897a30c0c4e3ab406013fcca1
|
||||
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
|
||||
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index c17d8e00cd43f2f969c81be2ee65fab2b8578eae..15dc5af10041f71b5d377353302fb09a34bcda82 100644
|
||||
index abef96d4c0ee22d05fc8b462811189128900fb8d..b4a77d66e84e335cecf7e3290aa36d17ac600033 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -571,6 +571,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -570,6 +570,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return player != null && player.level() == this ? player : null;
|
||||
}
|
||||
// Paper end
|
||||
|
@ -8,10 +8,10 @@ we can instead use the nearby player tracking system to reduce
|
||||
the number of tests per search.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 15dc5af10041f71b5d377353302fb09a34bcda82..1d44387ea8665f7bbf3da04a1dd882f586ff37ac 100644
|
||||
index b4a77d66e84e335cecf7e3290aa36d17ac600033..ba5b86211b02fc5a90d1e3443afbd1e41fc1dbf1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -582,6 +582,115 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -581,6 +581,115 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
this.lagCompensationTick = (System.nanoTime() - net.minecraft.server.MinecraftServer.SERVER_INIT) / (java.util.concurrent.TimeUnit.MILLISECONDS.toNanos(50L));
|
||||
}
|
||||
// Paper end - lag compensation
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Fix missing map initialize event call
|
||||
public net.minecraft.world.level.storage.DimensionDataStorage readSavedData(Ljava/util/function/Function;Lnet/minecraft/util/datafix/DataFixTypes;Ljava/lang/String;)Lnet/minecraft/world/level/saveddata/SavedData;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1d44387ea8665f7bbf3da04a1dd882f586ff37ac..676087c3addd712939c865b39ddb5d9f0bc7ce25 100644
|
||||
index ba5b86211b02fc5a90d1e3443afbd1e41fc1dbf1..af712365d676bc33314b5a3fc6ff8ae823dc3012 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2134,13 +2134,25 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2133,13 +2133,25 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@Nullable
|
||||
@Override
|
||||
public MapItemSavedData getMapData(String id) {
|
||||
|
@ -19,10 +19,10 @@ where generation happened directly to a ServerLevel and the
|
||||
entity still has the flag set.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 676087c3addd712939c865b39ddb5d9f0bc7ce25..7c31f619a6e8e3539c547fc43d821d2cce7df7e7 100644
|
||||
index af712365d676bc33314b5a3fc6ff8ae823dc3012..891ebb5a03adaa5d184b7363bbfa94e8a17c2773 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1682,6 +1682,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1681,6 +1681,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit start
|
||||
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren