Patching patched patches

This commit is contained in:
Nassim Jahnke 2022-12-07 20:22:28 +01:00
parent dfab659e53
commit 7f3d2ff503
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
149 changed files with 550 additions and 542 deletions

View File

@ -5091,7 +5091,7 @@ index 92a64c49b1c7227a5b34488ea15d3d8adb0f9c80..0b67858f8d6689b34816f9556f3424af
this.fluidTicks = fluidTickScheduler;
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index 6fdd5c92ab069896e3921faa042cbdb3c29d0538..942f8db571cf87d0e9614bdc7dd9525068cf1001 100644
index 6fdd5c92ab069896e3921faa042cbdb3c29d0538..a3c14a470ac7055abd00ac6f4f1c02065a485d3b 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -84,6 +84,14 @@ public class ChunkSerializer {
@ -5120,8 +5120,7 @@ index 6fdd5c92ab069896e3921faa042cbdb3c29d0538..942f8db571cf87d0e9614bdc7dd95250
LevelChunkSection[] achunksection = new LevelChunkSection[i];
boolean flag1 = world.dimensionType().hasSkyLight();
ServerChunkCache chunkproviderserver = world.getChunkSource();
- LevelLightEngine lightengine = chunkproviderserver.getLightEngine();
+ LevelLightEngine lightengine = chunkproviderserver.getLightEngine();;
LevelLightEngine lightengine = chunkproviderserver.getLightEngine();
+ // Paper start
+ ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] blockNibbles = ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world);
+ ca.spottedleaf.starlight.common.light.SWMRNibbleArray[] skyNibbles = ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world);

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 6eada8313e468e4ea851094976ac98c11710fb45..3f854bea2e6be82c7ad12b4d13064de8baec55c7 100644
index a889be9dd2a94b531a227ff69a5e761e103067be..d8c9beab9163820df949f6002bbb9224a044c6f3 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -532,6 +532,11 @@ public class EnderDragon extends Mob implements Enemy {
@ -21,7 +21,7 @@ index 6eada8313e468e4ea851094976ac98c11710fb45..3f854bea2e6be82c7ad12b4d13064de8
this.level.removeBlock(blockposition, false);
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
index 037902b3addd34dfc6b751ca225373a06c2d6a89..69903bad7b3e143b73b20624c06909458564396c 100644
index e725168ebce3d1b2548a1bc5baa612a6e718e337..7e48326b6dc847a84e0aff2d393cadf9bace7979 100644
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
@@ -290,12 +290,19 @@ public class FireBlock extends BaseFireBlock {
@ -46,7 +46,7 @@ index 037902b3addd34dfc6b751ca225373a06c2d6a89..69903bad7b3e143b73b20624c0690945
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/TntBlock.java b/src/main/java/net/minecraft/world/level/block/TntBlock.java
index 9fcad0eb55a4a91a89ab8bce1f22d91127a94fb2..dd0707bc0a9daf3cd5441a82e9d3502b53d2d0bf 100644
index f5b685cb678f523c1c07d72b818ada93af64840a..ade39e877edbb07082bb2d87e00ae4bfb6ab1c8f 100644
--- a/src/main/java/net/minecraft/world/level/block/TntBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/TntBlock.java
@@ -38,6 +38,11 @@ public class TntBlock extends Block {
@ -83,7 +83,7 @@ index 9fcad0eb55a4a91a89ab8bce1f22d91127a94fb2..dd0707bc0a9daf3cd5441a82e9d3502b
+ if(!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.EXPLOSION, source).callEvent())
+ return;
+ // Paper end
PrimedTnt entitytntprimed = new PrimedTnt(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, explosion.getSourceMob());
PrimedTnt entitytntprimed = new PrimedTnt(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, explosion.getIndirectSourceEntity());
int i = entitytntprimed.getFuse();
@@ -95,6 +111,11 @@ public class TntBlock extends Block {

View File

@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4fd16cc84b9edbadbbc073494656aa1fadb0c275..c50d2b797be6a69bb632a7e88bf353d0a134e676 100644
index 867478671d3223338bf01a36da0361a5ae1f38be..c5ad4d8a08f03a6f75241f4e4913d84bcb0fdf0b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -262,6 +262,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -261,6 +261,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private long keepAliveChallenge;
// CraftBukkit start - multithreaded fields
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
@ -33,7 +33,7 @@ index 4fd16cc84b9edbadbbc073494656aa1fadb0c275..c50d2b797be6a69bb632a7e88bf353d0
// CraftBukkit end
private int dropSpamTickCount;
private double firstGoodX;
@@ -416,6 +417,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -409,6 +410,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.server.getProfiler().pop();
// CraftBukkit start
for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ;
@ -41,7 +41,7 @@ index 4fd16cc84b9edbadbbc073494656aa1fadb0c275..c50d2b797be6a69bb632a7e88bf353d0
/* Use thread-safe field access instead
if (this.chatSpamTickCount > 0) {
--this.chatSpamTickCount;
@@ -793,7 +795,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -785,7 +787,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async
// CraftBukkit start

View File

@ -8,10 +8,10 @@ Addresses two issues:
- Allay duplication cooldown is saved and exposed as a long, but loaded as an int
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
index 2fead19c1c4b04f94999887b196ceaee025edd99..2d1228670696224452cb432e0279456d8c5fe710 100644
index cc3c1d6b76f66cd0f511c5fd57ffa606eba0d387..cf5c7e8557b0084039a94ef881a36aa9e3f58daf 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
@@ -286,7 +286,7 @@ public class ExperienceOrb extends Entity {
@@ -287,7 +287,7 @@ public class ExperienceOrb extends Entity {
public void addAdditionalSaveData(CompoundTag nbt) {
nbt.putShort("Health", (short) this.health);
nbt.putShort("Age", (short) this.age);
@ -20,7 +20,7 @@ index 2fead19c1c4b04f94999887b196ceaee025edd99..2d1228670696224452cb432e0279456d
nbt.putInt("Count", this.count);
this.savePaperNBT(nbt); // Paper
}
@@ -295,7 +295,7 @@ public class ExperienceOrb extends Entity {
@@ -296,7 +296,7 @@ public class ExperienceOrb extends Entity {
public void readAdditionalSaveData(CompoundTag nbt) {
this.health = nbt.getShort("Health");
this.age = nbt.getShort("Age");
@ -30,10 +30,10 @@ index 2fead19c1c4b04f94999887b196ceaee025edd99..2d1228670696224452cb432e0279456d
this.loadPaperNBT(nbt); // Paper
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
index 2d87b740e84435ef9bd3eee3d3e2af9f707a0826..1dcd0c494681b7665b6b86dbe20375afd8d2fad8 100644
index fec05f88720fa09ed9361fd24f5abfa134013d6c..c0084b1f146a4697194c421519537e612ff737c0 100644
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
@@ -484,7 +484,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier {
@@ -521,7 +521,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier {
});
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary itemmeta handling
diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
index 70631b3fe080320dfea0d1a4deb23e87448da250..35377576ed182814051c11f902e02e8e921e84e3 100644
index 76914b08c17a62a117319d458a6693070fc46348..32ee4ed11aefd82dca2e3e78b3108f041fdc3695 100644
--- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java
+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java
@@ -579,7 +579,7 @@ public class FriendlyByteBuf extends ByteBuf {
@@ -641,7 +641,7 @@ public class FriendlyByteBuf extends ByteBuf {
if (item.canBeDepleted() || item.shouldOverrideMultiplayerNbt()) {
// Spigot start - filter
stack = stack.copy();
@ -17,7 +17,7 @@ index 70631b3fe080320dfea0d1a4deb23e87448da250..35377576ed182814051c11f902e02e8e
// Spigot end
nbttagcompound = stack.getTag();
}
@@ -600,7 +600,7 @@ public class FriendlyByteBuf extends ByteBuf {
@@ -662,7 +662,7 @@ public class FriendlyByteBuf extends ByteBuf {
itemstack.setTag(this.readNbt());
// CraftBukkit start

View File

@ -8,10 +8,10 @@ Add -Ddebug.entities=true to your JVM flags to gain more information
1.17: Needs to be reworked for new entity storage system
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 236e0f8cc271d1ca1a2cb64e333d59de1cb953ea..2b14841c23c9d9f4a6fe82fb2779cd5ff79a96f6 100644
index c6706c3d7841869134be89dd09ea723820d306a2..23bbd70dd2dd487caf972c2b1a6c85a1caa3fbcd 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -884,6 +884,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -896,6 +896,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
} else {
ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas());
@ -19,7 +19,7 @@ index 236e0f8cc271d1ca1a2cb64e333d59de1cb953ea..2b14841c23c9d9f4a6fe82fb2779cd5f
this.entityMap.put(entity.getId(), playerchunkmap_entitytracker);
playerchunkmap_entitytracker.updatePlayers(this.level.players());
if (entity instanceof ServerPlayer) {
@@ -926,7 +927,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -938,7 +939,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (playerchunkmap_entitytracker1 != null) {
playerchunkmap_entitytracker1.broadcastRemoved();
}
@ -29,10 +29,10 @@ index 236e0f8cc271d1ca1a2cb64e333d59de1cb953ea..2b14841c23c9d9f4a6fe82fb2779cd5f
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 9a17624d684394ee956848fe9f36750d5962c980..672f74f89a643ef82d391c521ca45a2beb51a46e 100644
index c27ceaf1b9685f1433799d50bacc361db793c1d5..f2b20fe0770b519756342c7b900919c6a9d93bdb 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -216,6 +216,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -219,6 +219,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 9a17624d684394ee956848fe9f36750d5962c980..672f74f89a643ef82d391c521ca45a2b
@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);
@@ -1232,7 +1235,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1272,7 +1275,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 9a17624d684394ee956848fe9f36750d5962c980..672f74f89a643ef82d391c521ca45a2b
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 f67480cc4ff05d23a16b63dbe986d0d96739496b..f174af45cd593d8f74205472e25db081b5289ee9 100644
index ac6bd21798192c4c07737a2320c3626caebc7e22..b8257959acd2b38243fd259f367564080aff951e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -235,6 +235,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -85,10 +85,10 @@ index f67480cc4ff05d23a16b63dbe986d0d96739496b..f174af45cd593d8f74205472e25db081
if (this.bukkitEntity == null) {
this.bukkitEntity = CraftEntity.getEntity(this.level.getCraftServer(), this);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index f4249ee3259a95b9f079a75c78ccf96a14b99b0d..9ed8117afa4eb1ff9e7403d3ab92a9e6cb0fab73 100644
index 808a025548fd390ef4d657c53eb9bf73e73dbc93..638a77d3ea65b509b9fcdd3c1e3ea0abe5b7566f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -148,6 +148,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -147,6 +147,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public boolean pvpMode;
public boolean keepSpawnInMemory = true;
public org.bukkit.generator.ChunkGenerator generator;
@ -97,7 +97,7 @@ index f4249ee3259a95b9f079a75c78ccf96a14b99b0d..9ed8117afa4eb1ff9e7403d3ab92a9e6
public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710
public boolean captureBlockStates = false;
diff --git a/src/main/java/net/minecraft/world/level/entity/EntityLookup.java b/src/main/java/net/minecraft/world/level/entity/EntityLookup.java
index e6b9f812e521abd552e0c7dc0429d5a62f2bfc35..f4731d69946871768ecf16149a47d2ef1cb3e910 100644
index 21a2800db22f287b9c6a8290326fdf3b94ae94b1..d45d832232be5017dde53816191c2b1830a0da32 100644
--- a/src/main/java/net/minecraft/world/level/entity/EntityLookup.java
+++ b/src/main/java/net/minecraft/world/level/entity/EntityLookup.java
@@ -34,6 +34,26 @@ public class EntityLookup<T extends EntityAccess> {

View File

@ -9,10 +9,10 @@ thread dumps at an interval until the point of crash.
This will help diagnose what was going on in that time before the crash.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 3509785412395aec7d316fcf37d58fb7cb1a9e5f..25aac194eb486a5b8707aa0a655fd8259ad7409c 100644
index 2b55df58684a19519335666858bc79de8067faf7..6026a2da9645a5f22aa18c74e35d8b76a3f29352 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1044,6 +1044,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1051,6 +1051,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.updateStatusIcon(this.status);
// Spigot start
@ -21,10 +21,10 @@ index 3509785412395aec7d316fcf37d58fb7cb1a9e5f..25aac194eb486a5b8707aa0a655fd825
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
lastTick = start - TICK_TIME; // Paper
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index bada827fe2a8a58d029d9459bf576d598e4a196f..a7fab8d6d3291933516e686f0f23c9057397bcf6 100644
index e6826cd0a596f063e8737dcde3c8c6c5b3f71970..1a2607d1b257cea65c82c661a6b3d46c1526a775 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -202,6 +202,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -197,6 +197,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
// Paper start
paperConfigurations.initializeGlobalConfiguration();
paperConfigurations.initializeWorldDefaultsConfiguration();
@ -33,10 +33,10 @@ index bada827fe2a8a58d029d9459bf576d598e4a196f..a7fab8d6d3291933516e686f0f23c905
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 10070e017f6d8845e2533cd4bee8e9c37178d77d..d1f73e325f53c838a6761c0d0f66fd32a887dc51 100644
index 1c8a103d70ddb7d178057d48abddf75c69f789b7..dc9fce11cb5b76b9e29c0f50c90c96fdf0b830ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -911,6 +911,7 @@ public final class CraftServer implements Server {
@@ -924,6 +924,7 @@ public final class CraftServer implements Server {
@Override
public void reload() {
@ -44,7 +44,7 @@ index 10070e017f6d8845e2533cd4bee8e9c37178d77d..d1f73e325f53c838a6761c0d0f66fd32
this.reloadCount++;
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
@@ -999,6 +1000,7 @@ public final class CraftServer implements Server {
@@ -1012,6 +1013,7 @@ public final class CraftServer implements Server {
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
@ -53,7 +53,7 @@ index 10070e017f6d8845e2533cd4bee8e9c37178d77d..d1f73e325f53c838a6761c0d0f66fd32
@Override
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index 645643d102118ad4916a152abfb9ab0d02751e11..edc5f195cc3de8885b839469656650ba465346be 100644
index ddc5f2d9aa7dda6aff132392927e3d7e3674dbff..3ac48dafe2300ff4cf4591569fec9ce4916503cd 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -229,7 +229,7 @@ public class SpigotConfig

View File

@ -23,10 +23,10 @@ Modified isEmpty to use the isEmpty() method instead of the slightly confusing s
The point of this is readability, but does have a side-benefit of a small microptimization
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index a462b33a35bf2e5ea9492eb37ac689830abd392a..b71d20841285350d0dfad8d59537f9fcc7a7e44c 100644
index 0f33c4bf3cb52f192d5dfe8b55a72c7a5a2f9311..52708bcdc046cc0a7f3798bfef06e49a6215acfd 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -624,7 +624,7 @@ public abstract class PlayerList {
@@ -632,7 +632,7 @@ public abstract class PlayerList {
} else if (!this.isWhiteListed(gameprofile, event)) { // Paper
//ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted"); // Paper
//event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure - moved to isWhitelisted

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Use a Queue for Queueing Commands
Lists are bad as Queues mmmkay.
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index a7fab8d6d3291933516e686f0f23c9057397bcf6..8dc6aef7f8b9950d889770bf62bd672be9f12f74 100644
index 1a2607d1b257cea65c82c661a6b3d46c1526a775..338841804a92bea5ca074300eaea9374d1b77020 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -74,7 +74,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -69,7 +69,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
static final Logger LOGGER = LogUtils.getLogger();
private static final int CONVERSION_RETRY_DELAY_MS = 5000;
private static final int CONVERSION_RETRIES = 2;
@ -18,7 +18,7 @@ index a7fab8d6d3291933516e686f0f23c9057397bcf6..8dc6aef7f8b9950d889770bf62bd672b
@Nullable
private QueryThreadGs4 queryThreadGs4;
public final RconConsoleSource rconConsoleSource;
@@ -446,13 +446,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -440,13 +440,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
return;
}
// Paper end - rewrite chunk system

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index fd50cc4cfc976a9dee82d4f6ad457bba18065614..1827fdc551095ab411d6b43b94106273f53386c8 100644
index 46b1cce7d482adea911b71f3e3623ac0574a85ae..6772b7e6ebded67f656dfb1af99e4d516aca67c5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -4,8 +4,10 @@ import com.google.common.base.Preconditions;
@ -19,7 +19,7 @@ index fd50cc4cfc976a9dee82d4f6ad457bba18065614..1827fdc551095ab411d6b43b94106273
import java.util.Objects;
import java.util.concurrent.locks.LockSupport;
import java.util.function.BooleanSupplier;
@@ -133,6 +135,13 @@ public class CraftChunk implements Chunk {
@@ -134,6 +136,13 @@ public class CraftChunk implements Chunk {
@Override
public BlockState[] getTileEntities() {
@ -33,7 +33,7 @@ index fd50cc4cfc976a9dee82d4f6ad457bba18065614..1827fdc551095ab411d6b43b94106273
if (!this.isLoaded()) {
this.getWorld().getChunkAt(x, z); // Transient load for this tick
}
@@ -147,7 +156,29 @@ public class CraftChunk implements Chunk {
@@ -148,7 +157,29 @@ public class CraftChunk implements Chunk {
}
BlockPos position = (BlockPos) obj;

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Optimize BlockPosition helper methods
Resolves #1338
diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java
index abd6fcab220d5616131e5bdd2f6a68a9105b7891..f8361dcf9d0378497ec5a34ea53b4e0019700851 100644
index a72dfbfa2aa636ac8bac07a62777126cf2696241..f35cc28b1fde73e9eae077f597c2822842a282ce 100644
--- a/src/main/java/net/minecraft/core/BlockPos.java
+++ b/src/main/java/net/minecraft/core/BlockPos.java
@@ -130,67 +130,84 @@ public class BlockPos extends Vec3i {
@@ -134,67 +134,84 @@ public class BlockPos extends Vec3i {
@Override
public BlockPos above() {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Slime Pathfinder Events
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
index 7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8..48feda682284321d18c846e4812909f0e7e649e3 100644
index 85abd62434cbe3beb63f61262504372b971d9684..058ba40491f3e566c4c159978c677ceb87fa8383 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
@@ -41,6 +41,12 @@ import net.minecraft.world.level.ServerLevelAccessor;
@ -21,7 +21,7 @@ index 7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8..48feda682284321d18c846e4812909f0
// CraftBukkit start
import java.util.ArrayList;
import java.util.List;
@@ -106,6 +112,7 @@ public class Slime extends Mob implements Enemy {
@@ -107,6 +113,7 @@ public class Slime extends Mob implements Enemy {
@Override
public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
@ -29,7 +29,7 @@ index 7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8..48feda682284321d18c846e4812909f0
nbt.putInt("Size", this.getSize() - 1);
nbt.putBoolean("wasOnGround", this.wasOnGround);
}
@@ -114,6 +121,11 @@ public class Slime extends Mob implements Enemy {
@@ -115,6 +122,11 @@ public class Slime extends Mob implements Enemy {
public void readAdditionalSaveData(CompoundTag nbt) {
this.setSize(nbt.getInt("Size") + 1, false);
super.readAdditionalSaveData(nbt);
@ -41,7 +41,7 @@ index 7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8..48feda682284321d18c846e4812909f0
this.wasOnGround = nbt.getBoolean("wasOnGround");
}
@@ -448,7 +460,7 @@ public class Slime extends Mob implements Enemy {
@@ -450,7 +462,7 @@ public class Slime extends Mob implements Enemy {
@Override
public boolean canUse() {
@ -50,7 +50,7 @@ index 7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8..48feda682284321d18c846e4812909f0
}
@Override
@@ -480,7 +492,15 @@ public class Slime extends Mob implements Enemy {
@@ -482,7 +494,15 @@ public class Slime extends Mob implements Enemy {
public boolean canUse() {
LivingEntity entityliving = this.slime.getTarget();
@ -67,7 +67,7 @@ index 7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8..48feda682284321d18c846e4812909f0
}
@Override
@@ -493,7 +513,15 @@ public class Slime extends Mob implements Enemy {
@@ -495,7 +515,15 @@ public class Slime extends Mob implements Enemy {
public boolean canContinueToUse() {
LivingEntity entityliving = this.slime.getTarget();
@ -84,7 +84,7 @@ index 7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8..48feda682284321d18c846e4812909f0
}
@Override
@@ -511,6 +539,13 @@ public class Slime extends Mob implements Enemy {
@@ -513,6 +541,13 @@ public class Slime extends Mob implements Enemy {
((Slime.SlimeMoveControl) this.slime.getMoveControl()).setDirection(this.slime.getYRot(), this.slime.isDealsDamage());
}
@ -98,7 +98,7 @@ index 7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8..48feda682284321d18c846e4812909f0
}
private static class SlimeRandomDirectionGoal extends Goal {
@@ -526,7 +561,7 @@ public class Slime extends Mob implements Enemy {
@@ -528,7 +563,7 @@ public class Slime extends Mob implements Enemy {
@Override
public boolean canUse() {
@ -107,7 +107,7 @@ index 7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8..48feda682284321d18c846e4812909f0
}
@Override
@@ -534,6 +569,11 @@ public class Slime extends Mob implements Enemy {
@@ -536,6 +571,11 @@ public class Slime extends Mob implements Enemy {
if (--this.nextRandomizeTime <= 0) {
this.nextRandomizeTime = this.adjustedTickDelay(40 + this.slime.getRandom().nextInt(60));
this.chosenDegrees = (float) this.slime.getRandom().nextInt(360);
@ -119,7 +119,7 @@ index 7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8..48feda682284321d18c846e4812909f0
}
((Slime.SlimeMoveControl) this.slime.getMoveControl()).setDirection(this.chosenDegrees, false);
@@ -551,7 +591,7 @@ public class Slime extends Mob implements Enemy {
@@ -553,7 +593,7 @@ public class Slime extends Mob implements Enemy {
@Override
public boolean canUse() {
@ -128,7 +128,7 @@ index 7b95d18fb5edbd1575f6be92bfcbb3e0d7f691c8..48feda682284321d18c846e4812909f0
}
@Override
@@ -559,4 +599,15 @@ public class Slime extends Mob implements Enemy {
@@ -561,4 +601,15 @@ public class Slime extends Mob implements Enemy {
((Slime.SlimeMoveControl) this.slime.getMoveControl()).setWantedMovement(1.0D);
}
}

View File

@ -7,11 +7,11 @@ 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 51ac731cf49e6d2cd574e48f26c4b151e9014826..61a792c5ccf3688d4f78c6e7461090f63a0cc26a 100644
index 5bba39a066ede470cebc92724735c86ecfd4239d..c53b80cba9ea658d20e527a9bfcd6b5d7d9f51fc 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
@@ -696,6 +696,14 @@ public abstract class BlockBehaviour {
this.offsetType = (BlockBehaviour.OffsetType) blockbase_info.offsetType.apply(this.asState());
@@ -728,6 +728,14 @@ public abstract class BlockBehaviour implements FeatureElement {
this.spawnParticlesOnBreak = blockbase_info.spawnParticlesOnBreak;
this.conditionallyFullOpaque = this.isOpaque() & this.isTransparentOnSomeFaces(); // Paper
}
+ // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time
@ -26,10 +26,10 @@ index 51ac731cf49e6d2cd574e48f26c4b151e9014826..61a792c5ccf3688d4f78c6e7461090f6
// Paper start
protected boolean shapeExceedsCube = true;
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index 8a4dcbbfdc4ef9f7fcd1eb04db010f93f5f06933..514e1ab74cd24cfcf1dd031e69a8ebfaddf9d3dc 100644
index 953fe30e445885809caa16161262089a7786057b..6182ce8c32a334d3488c03f42bf3befcc0b80503 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -539,7 +539,17 @@ public class CraftBlockData implements BlockData {
@@ -542,7 +542,17 @@ public class CraftBlockData implements BlockData {
return craft;
}

View File

@ -8,33 +8,35 @@ Use larger initial sizes to increase bucket capacity on the BiMap
BiMap.get was seen to be using a good bit of CPU time.
diff --git a/src/main/java/net/minecraft/core/MappedRegistry.java b/src/main/java/net/minecraft/core/MappedRegistry.java
index db530be96664fc45c881f7438c739109a0aace75..3ef5d440fd3ce209110543bfd36569e846a5b749 100644
index 300e009abbc41961d59d55d965e9a99d44c21e32..38a4c1d355e74dbe0cf7f5040d00423209aca0d1 100644
--- a/src/main/java/net/minecraft/core/MappedRegistry.java
+++ b/src/main/java/net/minecraft/core/MappedRegistry.java
@@ -37,13 +37,11 @@ import org.slf4j.Logger;
public class MappedRegistry<T> extends WritableRegistry<T> {
@@ -36,14 +36,12 @@ public class MappedRegistry<T> implements WritableRegistry<T> {
private static final Logger LOGGER = LogUtils.getLogger();
final ResourceKey<? extends Registry<T>> key;
private final ObjectList<Holder.Reference<T>> byId = new ObjectArrayList<>(256);
- private final Object2IntMap<T> toId = Util.make(new Object2IntOpenCustomHashMap<>(Util.identityStrategy()), (object2IntOpenCustomHashMap) -> {
- object2IntOpenCustomHashMap.defaultReturnValue(-1);
- private final Object2IntMap<T> toId = Util.make(new Object2IntOpenCustomHashMap<>(Util.identityStrategy()), (map) -> {
- map.defaultReturnValue(-1);
- });
- private final Map<ResourceLocation, Holder.Reference<T>> byLocation = new HashMap<>();
- private final Map<ResourceKey<T>, Holder.Reference<T>> byKey = new HashMap<>();
- private final Map<T, Holder.Reference<T>> byValue = new IdentityHashMap<>();
- private final Map<T, Lifecycle> lifecycles = new IdentityHashMap<>();
- private Lifecycle registryLifecycle;
+ private final it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap<T> toId = new it.unimi.dsi.fastutil.objects.Reference2IntOpenHashMap<T>(2048);// Paper - use bigger expected size to reduce collisions and direct intent for FastUtil to be identity map
+ private final Map<ResourceLocation, Holder.Reference<T>> byLocation = new HashMap<>(2048); // Paper - use bigger expected size to reduce collisions
+ private final Map<ResourceKey<T>, Holder.Reference<T>> byKey = new HashMap<>(2048); // Paper - use bigger expected size to reduce collisions
+ private final Map<T, Holder.Reference<T>> byValue = new IdentityHashMap<>(2048); // Paper - use bigger expected size to reduce collisions
+ private final Map<T, Lifecycle> lifecycles = new IdentityHashMap<>(2048); // Paper - use bigger expected size to reduce collisions
private Lifecycle elementsLifecycle;
+ private Lifecycle elementsLifecycle;
private volatile Map<TagKey<T>, HolderSet.Named<T>> tags = new IdentityHashMap<>();
private boolean frozen;
@@ -63,6 +61,7 @@ public class MappedRegistry<T> extends WritableRegistry<T> {
this.intrusiveHolderCache = new IdentityHashMap<>();
}
+ this.toId.defaultReturnValue(-1); // Paper
@Nullable
@@ -88,6 +86,7 @@ public class MappedRegistry<T> implements WritableRegistry<T> {
}
private List<Holder.Reference<T>> holdersInOrder() {
public MappedRegistry(ResourceKey<? extends Registry<T>> key, Lifecycle lifecycle, boolean intrusive) {
+ this.toId.defaultReturnValue(-1); // Paper
Bootstrap.checkBootstrapCalled(() -> {
return "registry " + key;
});

View File

@ -48,7 +48,7 @@ index c068eddb08898681735e483df5b9c36f5fef3878..0e96e9d7e4d636f4222f60cec556663f
CIRCLE, SWOOP;
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
index 573490a7c95746c3d372d258b2e592241258f6cf..0dbb0c4d038379c6ffdae8528d98431e98faeb93 100644
index 42d88ce2e15477482a814a79aefd4abfcbcb5462..900a66fc7eb817509df904b71ccc3bd3976f3b35 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java
@@ -3,6 +3,7 @@ package net.minecraft.world.level.levelgen;
@ -59,7 +59,7 @@ index 573490a7c95746c3d372d258b2e592241258f6cf..0dbb0c4d038379c6ffdae8528d98431e
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.stats.ServerStatsCounter;
@@ -71,8 +72,17 @@ public class PhantomSpawner implements CustomSpawner {
@@ -71,9 +72,19 @@ public class PhantomSpawner implements CustomSpawner {
int k = 1 + randomsource.nextInt(difficultydamagescaler.getDifficulty().getId() + 1);
for (int l = 0; l < k; ++l) {
@ -73,11 +73,12 @@ index 573490a7c95746c3d372d258b2e592241258f6cf..0dbb0c4d038379c6ffdae8528d98431e
+ }
+ // Paper end
Phantom entityphantom = (Phantom) EntityType.PHANTOM.create(world);
-
+ entityphantom.setSpawningEntity(entityhuman.getUUID()); // Paper
entityphantom.moveTo(blockposition1, 0.0F, 0.0F);
groupdataentity = entityphantom.finalizeSpawn(world, difficultydamagescaler, MobSpawnType.NATURAL, groupdataentity, (CompoundTag) null);
world.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
if (entityphantom != null) {
+ entityphantom.setSpawningEntity(entityhuman.getUUID()); // Paper
entityphantom.moveTo(blockposition1, 0.0F, 0.0F);
groupdataentity = entityphantom.finalizeSpawn(world, difficultydamagescaler, MobSpawnType.NATURAL, groupdataentity, (CompoundTag) null);
world.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
index f77b83bee6eb739220b55793a0807f0267cfc8a9..c9dab70b0b284fe1c1daafd3c1f5bd08b14fa35d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add More Creeper API
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
index bc493838420a6857ebc86f84cabdc1b6e3e637a4..e0f71dc12cfc28710cacfbc372026f556dcab165 100644
index 802a46ae9f18e0b58a7e0c38c18b367edd6b7a76..805e267090285d625dbeb75b06f8c5ad141a75a4 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
@@ -133,7 +133,7 @@ public class Creeper extends Monster implements PowerableMob {
@@ -132,7 +132,7 @@ public class Creeper extends Monster implements PowerableMob {
}
if (nbt.getBoolean("ignited")) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Inventory#removeItemAnySlot
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index d76d70e7031a643f697a8ec13471450de2bca705..6ca8e76d1569f3f631275fea187e7110f09fc69e 100644
index efa6b34261e3f4ad0d58a0c7d85df30f33a14d62..ce70a77ec6da41b59660f5923d30eaebf24c4cc2 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -223,10 +223,16 @@ public class CraftInventory implements Inventory {
@@ -224,10 +224,16 @@ public class CraftInventory implements Inventory {
}
private int first(ItemStack item, boolean withAmount) {
@ -26,7 +26,7 @@ index d76d70e7031a643f697a8ec13471450de2bca705..6ca8e76d1569f3f631275fea187e7110
for (int i = 0; i < inventory.length; i++) {
if (inventory[i] == null) continue;
@@ -349,6 +355,17 @@ public class CraftInventory implements Inventory {
@@ -350,6 +356,17 @@ public class CraftInventory implements Inventory {
@Override
public HashMap<Integer, ItemStack> removeItem(ItemStack... items) {
@ -44,7 +44,7 @@ index d76d70e7031a643f697a8ec13471450de2bca705..6ca8e76d1569f3f631275fea187e7110
Validate.notNull(items, "Items cannot be null");
HashMap<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>();
@@ -359,7 +376,10 @@ public class CraftInventory implements Inventory {
@@ -360,7 +377,10 @@ public class CraftInventory implements Inventory {
int toDelete = item.getAmount();
while (true) {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0f15340a7757dd22c689649a4019a0991da33b2e..92f6f332cc11ec4b7a10ff61b5a034ab80854940 100644
index b10f4e4bb39f4de1aba4f6949843fa3786cedc62..a21797af9f90235835919c395d2ea77a980b2768 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -392,7 +392,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -391,7 +391,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot

View File

@ -28,10 +28,10 @@ index b19850ae31f6c796cb3491dd5070d28e0ffd242c..30a5484d0209e7b99e81b70f654f5251
switch (enumDirection) {
case DOWN:
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index cc7cf6a8b610c72b72ba128c086df61371f59c25..9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03 100644
index 677ba704c32e590f3298575b1cc060bb69414ca4..d825dd9a990f52e378755e86c02c6a35f3bb3659 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3747,6 +3747,23 @@ public abstract class LivingEntity extends Entity {
@@ -3772,6 +3772,23 @@ public abstract class LivingEntity extends Entity {
}
// Paper start

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 58a1e433b0bd7c093c964a9dfcbb7287b5988af4..cea4285095979f0656821e897659c7b91d237e82 100644
index e5b32af97f045f52c92dcd8f56af1508c54db490..8c528f32ef3a5e97ff14bd299a1f6e93b1a8a9af 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2589,6 +2589,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2591,6 +2591,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.adventure$pointers;
}

View File

@ -23,10 +23,10 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index bc0c4c2284d08ca88d4664bb39c744b36a607dcd..6fa11d19b0a9858448fb22624c1d1a2fb228a3b4 100644
index b3fa1f28405ddebdd616bcc31db42d73697f2d79..05e72945da26295fbc5f0d243ba48a8649244b3b 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -230,6 +230,10 @@ public class ServerPlayer extends Player {
@@ -235,6 +235,10 @@ public class ServerPlayer extends Player {
public int latency;
public boolean wonGame;
private int containerUpdateDelay; // Paper
@ -37,7 +37,7 @@ index bc0c4c2284d08ca88d4664bb39c744b36a607dcd..6fa11d19b0a9858448fb22624c1d1a2f
// CraftBukkit start
public String displayName;
@@ -801,6 +805,15 @@ public class ServerPlayer extends Player {
@@ -823,6 +827,15 @@ public class ServerPlayer extends Player {
String deathmessage = defaultMessage.getString();
this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, PaperAdventure.asAdventure(defaultMessage), defaultMessage.getString(), keepInventory); // Paper - Adventure
@ -53,7 +53,7 @@ index bc0c4c2284d08ca88d4664bb39c744b36a607dcd..6fa11d19b0a9858448fb22624c1d1a2f
// SPIGOT-943 - only call if they have an inventory open
if (this.containerMenu != this.inventoryMenu) {
@@ -946,8 +959,17 @@ public class ServerPlayer extends Player {
@@ -968,8 +981,17 @@ public class ServerPlayer extends Player {
}
}
}
@ -74,10 +74,10 @@ index bc0c4c2284d08ca88d4664bb39c744b36a607dcd..6fa11d19b0a9858448fb22624c1d1a2f
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32057f081e 100644
index d825dd9a990f52e378755e86c02c6a35f3bb3659..785d5196c7e6de95e0507c959352ba57fb50d1c4 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -262,6 +262,7 @@ public abstract class LivingEntity extends Entity {
@@ -263,6 +263,7 @@ public abstract class LivingEntity extends Entity {
public Set<UUID> collidableExemptions = new HashSet<>();
public boolean bukkitPickUpLoot;
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
@ -85,7 +85,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32
@Override
public float getBukkitYaw() {
@@ -1465,13 +1466,12 @@ public abstract class LivingEntity extends Entity {
@@ -1466,13 +1467,12 @@ public abstract class LivingEntity extends Entity {
if (knockbackCancelled) this.level.broadcastEntityEvent(this, (byte) 2); // Paper - Disable explosion knockback
if (this.isDeadOrDying()) {
if (!this.checkTotemDeathProtection(source)) {
@ -103,7 +103,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32
}
} else if (flag1) {
this.playHurtSound(source);
@@ -1623,7 +1623,7 @@ public abstract class LivingEntity extends Entity {
@@ -1624,7 +1624,7 @@ public abstract class LivingEntity extends Entity {
if (!this.isRemoved() && !this.dead) {
Entity entity = damageSource.getEntity();
LivingEntity entityliving = this.getKillCredit();
@ -112,7 +112,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32
if (this.deathScore >= 0 && entityliving != null) {
entityliving.awardKillScore(this, this.deathScore, damageSource);
}
@@ -1635,20 +1635,53 @@ public abstract class LivingEntity extends Entity {
@@ -1636,20 +1636,53 @@ public abstract class LivingEntity extends Entity {
if (!this.level.isClientSide && this.hasCustomName()) {
if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot
}
@ -172,7 +172,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32
}
}
@@ -1656,7 +1689,7 @@ public abstract class LivingEntity extends Entity {
@@ -1657,7 +1690,7 @@ public abstract class LivingEntity extends Entity {
if (!this.level.isClientSide) {
boolean flag = false;
@ -181,7 +181,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32
if (this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
BlockPos blockposition = this.blockPosition();
BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
@@ -1685,7 +1718,11 @@ public abstract class LivingEntity extends Entity {
@@ -1686,7 +1719,11 @@ public abstract class LivingEntity extends Entity {
}
}
@ -194,7 +194,7 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32
Entity entity = source.getEntity();
int i;
@@ -1700,18 +1737,27 @@ public abstract class LivingEntity extends Entity {
@@ -1701,18 +1738,27 @@ public abstract class LivingEntity extends Entity {
this.dropEquipment(); // CraftBukkit - from below
if (this.shouldDropLoot() && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
this.dropFromLootTable(source, flag);
@ -224,10 +224,10 @@ index 9c3bda51dda1a9acbc2ea53250c7aec64a3aaf03..4291de1b9d6634bfdb2f6fda51426a32
// CraftBukkit start
public int getExpReward() {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index debc0cd9a71002878c0f68409b936e14c4a4dfda..836f42126eca9bc2c8e41940ecac18a0e0123818 100644
index 6f728231a7b326e605d6ddb8e4cd6f0f0aec820b..f61a4409ebb5ed89e5a5cfe0488498a52faa2346 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1018,7 +1018,13 @@ public abstract class Mob extends LivingEntity {
@@ -1036,7 +1036,13 @@ public abstract class Mob extends LivingEntity {
}
this.spawnAtLocation(itemstack);
@ -242,10 +242,10 @@ index debc0cd9a71002878c0f68409b936e14c4a4dfda..836f42126eca9bc2c8e41940ecac18a0
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
index fb3b42611d8386b110ea079094d5d50fefceac1a..8f294f10aca2df007830b12da0506f7614206a89 100644
index dd124ccbdc7efe0e41b3a04abddcb328cac44948..f4cfefd72704b3423392ffeb57e78c5d6410ff6f 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -700,15 +700,25 @@ public class Fox extends Animal {
@@ -705,15 +705,25 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
}
@Override
@ -275,7 +275,7 @@ index fb3b42611d8386b110ea079094d5d50fefceac1a..8f294f10aca2df007830b12da0506f76
public static boolean isPathClear(Fox fox, LivingEntity chasedEntity) {
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java
index c47884bab387647d99ed842b46f1c078ef9b6995..a3f3e06679cef10f50346e9cc6672ec91c6f04a6 100644
index 65dd844b9b38730a819158e1023c4abd829b52bb..170411b42aeef69c796d1409b59c3eb69f78c710 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java
@@ -69,11 +69,19 @@ public abstract class AbstractChestedHorse extends AbstractHorse {
@ -314,10 +314,10 @@ index f70f75867a8f03d42f240a0d007d2221269f2fdb..e463ae13ce6f65675c2b6d553ecf91db
this.gameEvent(GameEvent.ENTITY_DIE);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index cea4285095979f0656821e897659c7b91d237e82..0e9538a433e8ef721f29cc7b9f8fac914b876956 100644
index 8c528f32ef3a5e97ff14bd299a1f6e93b1a8a9af..15da4358e46547fa979dd5023ec6eb5d1358bcb5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2153,7 +2153,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2155,7 +2155,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void sendHealthUpdate() {
@ -334,7 +334,7 @@ index cea4285095979f0656821e897659c7b91d237e82..0e9538a433e8ef721f29cc7b9f8fac91
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index f16ab4b673f79a8f2b50caa2eefd7e55474ef28b..b86ba1b6e49128f50d3940708ec3b59580cbfde8 100644
index 99b5db683591b42cf6c88dcd6b9a4aa0cf769ce4..2dfade8cc1e5e7e774d876d1e60c692aca0ef739 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -806,9 +806,16 @@ public class CraftEventFactory {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Allow chests to be placed with NBT data
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 7b61f9c45b9e23562bd5cf448df319ba9e1e091a..b4fbe1f393e2c348bc0120bf6c55d57d61011787 100644
index 504a56fb2f2901c67ed22b9f0a57eb8db10ca4df..7d1e41272d05a8cb8d1adbcd2e9bc00f1a6f95fe 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -360,6 +360,7 @@ public final class ItemStack {
@@ -368,6 +368,7 @@ public final class ItemStack {
enuminteractionresult = InteractionResult.FAIL; // cancel placement
// PAIL: Remove this when MC-99075 fixed
placeEvent.getPlayer().updateInventory();

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent chunk loading from Fluid Flowing
diff --git a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
index 89296667d2ad76a706a3f5b817f3ad8c207cac2d..02be7c3d104fe3b3a2772201f5ebdfb6d16e9b49 100644
index 6f6358b3b24686cd8995cd71b6f7209b4227fc48..fb0784c8a4950776bd270bec3c80a8c5856c2655 100644
--- a/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
+++ b/src/main/java/net/minecraft/world/level/material/FlowingFluid.java
@@ -174,7 +174,8 @@ public abstract class FlowingFluid extends Fluid {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Prevent mob spawning from loading/generating chunks
also prevents if out of world border bounds
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index 6bc6c827a96e3fb7d7d9ca15e866d428d31a3e1f..243ed4b0fbc11b23883aa653e6efc31310c250f1 100644
index 608be2b8bfff1b89855fc0bd181430d3a29a4cbb..c3d6b904f1310c93a3d5c1e5e3fab2f3476f5a48 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -169,9 +169,9 @@ public final class NaturalSpawner {
@@ -170,9 +170,9 @@ public final class NaturalSpawner {
StructureManager structuremanager = world.structureManager();
ChunkGenerator chunkgenerator = world.getChunkSource().getGenerator();
int i = pos.getY();
@ -21,7 +21,7 @@ index 6bc6c827a96e3fb7d7d9ca15e866d428d31a3e1f..243ed4b0fbc11b23883aa653e6efc313
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
int j = 0;
int k = 0;
@@ -200,7 +200,7 @@ public final class NaturalSpawner {
@@ -201,7 +201,7 @@ public final class NaturalSpawner {
if (entityhuman != null) {
double d2 = entityhuman.distanceToSqr(d0, (double) i, d1);

View File

@ -11,7 +11,7 @@ to the nearest Integer when updating its current cook time.
Modified by: Eric Su <ericsu@alumni.usc.edu>
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78ccfbefbdff 100644
index 8137682be60eb617738f7b257780a49182ef970c..196c99a2802c0bcaf93be287c404fc4f0f23eadd 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -76,11 +76,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@ -36,7 +36,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc
}
public static Map<Item, Integer> getFuel() {
@@ -285,6 +288,11 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@@ -279,6 +282,11 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
this.recipesUsed.put(new ResourceLocation(s), nbttagcompound1.getInt(s));
}
@ -48,7 +48,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc
}
@Override
@@ -293,6 +301,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@@ -287,6 +295,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
nbt.putShort("BurnTime", (short) this.litTime);
nbt.putShort("CookTime", (short) this.cookingProgress);
nbt.putShort("CookTimeTotal", (short) this.cookingTotalTime);
@ -56,7 +56,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc
ContainerHelper.saveAllItems(nbt, this.items);
CompoundTag nbttagcompound1 = new CompoundTag();
@@ -364,7 +373,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@@ -358,7 +367,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
CraftItemStack source = CraftItemStack.asCraftMirror(blockEntity.items.get(0));
CookingRecipe<?> recipe = (CookingRecipe<?>) irecipe.toBukkitRecipe();
@ -65,7 +65,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc
world.getCraftServer().getPluginManager().callEvent(event);
blockEntity.cookingTotalTime = event.getTotalCookTime();
@@ -372,9 +381,9 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@@ -366,9 +375,9 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
// CraftBukkit end
++blockEntity.cookingProgress;
@ -77,7 +77,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc
if (AbstractFurnaceBlockEntity.burn(blockEntity.level, blockEntity.worldPosition, irecipe, blockEntity.items, i)) { // CraftBukkit
blockEntity.setRecipeUsed(irecipe);
}
@@ -474,9 +483,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@@ -468,9 +477,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
}
}
@ -93,7 +93,7 @@ index bbccb2f97ee88fe43af4eec30fbb2ecea1ebb1b4..d3a9b42fd4fa487e0acb1c95d57f78cc
public static boolean isFuel(ItemStack stack) {
return AbstractFurnaceBlockEntity.getFuel().containsKey(stack.getItem());
@@ -545,7 +558,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
@@ -539,7 +552,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
}
if (slot == 0 && !flag) {

View File

@ -61,7 +61,7 @@ index a0728e95251e8110bcecd00512c7a266fe120794..7dac559fd35e7ba646b84bb283150013
if (nbt.contains("TrackOutput", 1)) {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java
index 601cf7b9aa4b3483a2134a2db0d617ed8938ea48..cef6a9795b289b791db29f9018585e5912634b39 100644
index 6b983e3e867bdd8cdffaf4575bbf67ad96b57ec7..66e2137f9379e885294f2b9f67f7e35296792770 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java
@@ -98,7 +98,7 @@ public class BannerBlockEntity extends BlockEntity implements Nameable {
@ -74,10 +74,10 @@ index 601cf7b9aa4b3483a2134a2db0d617ed8938ea48..cef6a9795b289b791db29f9018585e59
this.itemPatterns = nbt.getList("Patterns", 10);
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
index a34ae15cd4048bda965fd1449c75f3bd8f0e530b..f1b5a7e29d2a94c18c0d06b066b8cfbccabbc0a1 100644
index 084e26de66c8204cb9aaad51bad3270228889ea3..a782994e2e53f2c4212c2d59ce740ebf00a826b0 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
@@ -30,7 +30,7 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co
@@ -31,7 +31,7 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co
super.load(nbt);
this.lockKey = LockCode.fromTag(nbt);
if (nbt.contains("CustomName", 8)) {
@ -87,10 +87,10 @@ index a34ae15cd4048bda965fd1449c75f3bd8f0e530b..f1b5a7e29d2a94c18c0d06b066b8cfbc
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
index 0c699c08ef85ca3339ada5c869b571581092a11d..12bb07ba7bcb37a26c0492e045b42289bfec70db 100644
index 3a17c143de499d81109ae7d6e9fe18718139c5b7..04c2872e2a492adef5aec98289a8cf2af6611757 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -365,7 +365,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
@@ -367,7 +367,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
this.levels = nbt.getInt("Levels"); // SPIGOT-5053, use where available
// CraftBukkit end
if (nbt.contains("CustomName", 8)) {

View File

@ -9,10 +9,10 @@ SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for
spawners.
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 2022224d2c5da60687474c5666e2bac207bf3f59..9a02dbecd02ffac91a3cb66d988125454b39caf6 100644
index 23cecd12f064f70d314393971312d881cace043a..a985364e5dd4a592e282ad16f0555f842a1d5048 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -130,11 +130,11 @@ public abstract class BaseSpawner {
@@ -134,11 +134,11 @@ public abstract class BaseSpawner {
org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key);
if (type != null) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 4291de1b9d6634bfdb2f6fda51426a32057f081e..09c8da5da1557e09af3350b3ac95fc204c590065 100644
index 785d5196c7e6de95e0507c959352ba57fb50d1c4..2c804ef89d910f706c449b4ce540ed1be3ac242a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -116,6 +116,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
@@ -117,6 +117,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
import net.minecraft.world.phys.AABB;
@ -16,7 +16,7 @@ index 4291de1b9d6634bfdb2f6fda51426a32057f081e..09c8da5da1557e09af3350b3ac95fc20
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.scores.PlayerTeam;
@@ -3810,6 +3811,38 @@ public abstract class LivingEntity extends Entity {
@@ -3835,6 +3836,38 @@ public abstract class LivingEntity extends Entity {
return level.clip(raytrace);
}

View File

@ -7,10 +7,10 @@ Subject: [PATCH] Add sun related API
public net.minecraft.world.entity.Mob isSunBurnTick()Z
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 92f6f332cc11ec4b7a10ff61b5a034ab80854940..ec3ea01033e2c6f2904d4f0a4b0e08bd12b713f7 100644
index a21797af9f90235835919c395d2ea77a980b2768..00cfc9abb31c7fada8a7e4a99850d5c9f5b71c96 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -679,6 +679,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -678,6 +678,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
}
}

View File

@ -25,10 +25,10 @@ index e3983370c09e3e3445c4557fcca50dd25f29cba0..6efba52c2e5d7811ee329ed22c1c76f7
private final int searchRange;
private final int verticalSearchRange;
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
index 37125ffe47fcd5fe93ab62ad8a46e8188f362436..0cea2eacfe3264a9b3500dc3a6a19d21d74d54e9 100644
index ab4e8ff5fe4f53bfda1d7b152aa89e6772bc3a16..30663713e198bfe40b95c48524b71ea65f39965e 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
@@ -480,14 +480,17 @@ public class Turtle extends Animal {
@@ -482,14 +482,17 @@ public class Turtle extends Animal {
if (!this.turtle.isInWater() && this.isReachedTarget()) {
if (this.turtle.layEggCounter < 1) {
@ -49,7 +49,7 @@ index 37125ffe47fcd5fe93ab62ad8a46e8188f362436..0cea2eacfe3264a9b3500dc3a6a19d21
}
// CraftBukkit end
this.turtle.setHasEgg(false);
@@ -555,7 +558,7 @@ public class Turtle extends Animal {
@@ -557,7 +560,7 @@ public class Turtle extends Animal {
@Override
public boolean canUse() {

View File

@ -19,10 +19,10 @@ spectate the target entity.
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 6fa11d19b0a9858448fb22624c1d1a2fb228a3b4..942081c458f597d7a0ff7b3478b4b1bf93e8b30d 100644
index 05e72945da26295fbc5f0d243ba48a8649244b3b..572dc30729a4511dcc7002434017edf8b0ce5a89 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1884,14 +1884,58 @@ public class ServerPlayer extends Player {
@@ -1908,15 +1908,59 @@ public class ServerPlayer extends Player {
}
public void setCamera(@Nullable Entity entity) {
@ -33,10 +33,11 @@ index 6fa11d19b0a9858448fb22624c1d1a2fb228a3b4..942081c458f597d7a0ff7b3478b4b1bf
- if (entity1 != this.camera) {
- this.connection.send(new ClientboundSetCameraPacket(this.camera));
- this.connection.teleport(this.camera.getX(), this.camera.getY(), this.camera.getZ(), this.getYRot(), this.getXRot(), TeleportCause.SPECTATE); // CraftBukkit
- this.connection.resetPosition();
+ if (entity == null) {
+ entity = this;
+ }
+
}
+ if (entity1 == entity) return; // new spec target is the current spec target
+
+ if (entity == this) {
@ -63,8 +64,8 @@ index 6fa11d19b0a9858448fb22624c1d1a2fb228a3b4..942081c458f597d7a0ff7b3478b4b1bf
+ MinecraftServer.LOGGER.debug("Blocking frozen player " + this + " from spectating entity " + entity);
+ return;
+ }
}
+ }
+
+ this.camera = entity; // only set after validating state
+
+ if (entity != this) {
@ -81,6 +82,7 @@ index 6fa11d19b0a9858448fb22624c1d1a2fb228a3b4..942081c458f597d7a0ff7b3478b4b1bf
+ this.connection.teleport(this.camera.getX(), this.camera.getY(), this.camera.getZ(), this.getYRot(), this.getXRot(), TeleportCause.SPECTATE); // CraftBukkit
+ }
+ this.connection.send(new ClientboundSetCameraPacket(entity));
+ this.connection.resetPosition();
+ // Paper end
}

View File

@ -11,10 +11,10 @@ If the projectile fails to find the shooter in the current world, check
other worlds.
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
index 7f787cd1fcdc71091973441844db6b7499417587..9379e887af9c15119bbb158dec88a016e649fb7c 100644
index 11cfe63c101f5d76d3481a3163dbaec22685ccce..b0caf14a196cd8c3a02d8e931a08857173ffb4da 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -57,6 +57,18 @@ public abstract class Projectile extends Entity {
@@ -58,6 +58,18 @@ public abstract class Projectile extends Entity {
return this.cachedOwner;
} else if (this.ownerUUID != null && this.level instanceof ServerLevel) {
this.cachedOwner = ((ServerLevel) this.level).getEntity(this.ownerUUID);

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c50d2b797be6a69bb632a7e88bf353d0a134e676..ed2af4174191dc7f167e8f44edf8f9a894cbc398 100644
index c5ad4d8a08f03a6f75241f4e4913d84bcb0fdf0b..9843684ab5cf21bfc4fe30f3528dc75475b4dcd1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -571,9 +571,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -563,9 +563,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
double d0 = entity.getX();
double d1 = entity.getY();
double d2 = entity.getZ();
@ -22,7 +22,7 @@ index c50d2b797be6a69bb632a7e88bf353d0a134e676..ed2af4174191dc7f167e8f44edf8f9a8
float f = Mth.wrapDegrees(packet.getYRot());
float f1 = Mth.wrapDegrees(packet.getXRot());
double d6 = d3 - this.vehicleFirstGoodX;
@@ -608,6 +608,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -600,6 +600,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
}
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
@ -39,7 +39,7 @@ index c50d2b797be6a69bb632a7e88bf353d0a134e676..ed2af4174191dc7f167e8f44edf8f9a8
if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
// CraftBukkit end
ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8});
@@ -1257,9 +1267,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1249,9 +1259,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.allowedPlayerTicks = 20; // CraftBukkit
} else {
this.awaitingTeleportTime = this.tickCount;
@ -52,7 +52,7 @@ index c50d2b797be6a69bb632a7e88bf353d0a134e676..ed2af4174191dc7f167e8f44edf8f9a8
float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot()));
float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot()));
@@ -1315,6 +1325,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1307,6 +1317,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
} else {
speed = this.player.getAbilities().walkingSpeed * 10f;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 942081c458f597d7a0ff7b3478b4b1bf93e8b30d..2f2def50a4dde2a949176da1030773e59521fb9a 100644
index 572dc30729a4511dcc7002434017edf8b0ce5a89..15d4ad53cca71272e491bea31d83e8c8e697dac0 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2297,6 +2297,7 @@ public class ServerPlayer extends Player {
@@ -2337,6 +2337,7 @@ public class ServerPlayer extends Player {
this.setHealth(this.getMaxHealth());
this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset

View File

@ -35,7 +35,7 @@ index 0000000000000000000000000000000000000000..b60f59cf5cc8eb84a6055b7861857dec
+ }
+}
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
index 336a26733b5bf73455f8ec10347c1e08b8e866f7..0773447354542925826369625f21e26aa30ebff4 100644
index c085ed233eb4d1f2100ec23a77447ef799ecdf1f..8120739e2a7c4c86ecb7058f08bd8179d3a943b8 100644
--- a/src/main/java/net/minecraft/Util.java
+++ b/src/main/java/net/minecraft/Util.java
@@ -79,8 +79,8 @@ public class Util {
@ -81,10 +81,10 @@ index 336a26733b5bf73455f8ec10347c1e08b8e866f7..0773447354542925826369625f21e26a
return executorService;
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 25aac194eb486a5b8707aa0a655fd8259ad7409c..6afa9ab5cb864ff286341582d6d70648d8a86efb 100644
index 6026a2da9645a5f22aa18c74e35d8b76a3f29352..45f3035be38571088edf293070b8d84b19a4101a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -306,6 +306,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -317,6 +317,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
atomicreference.set(s0);

View File

@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6afa9ab5cb864ff286341582d6d70648d8a86efb..1dcc7d93038cd0be45ba871c23225395e4751df4 100644
index 45f3035be38571088edf293070b8d84b19a4101a..f9007905422f7a6eac7c78fd5bdb17cb4da96712 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1372,12 +1372,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1379,12 +1379,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
// Send time updates to everyone, it will get the right time from the world the player is in.

View File

@ -161,7 +161,7 @@ index 0000000000000000000000000000000000000000..224d4b2cc45b0d02230a76caee9c8857
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
index 2371f17230358806f05e284f6aca341f18e935c5..567449faf1a5d805c44b5a2685904e919f20ade8 100644
index 0cbb702641348500bf8f8ab3b3c206f70aea9738..1f73834043c2d2be17ae647589653d517db36a1b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
@@ -71,13 +71,13 @@ public class CraftContainer extends AbstractContainerMenu {
@ -192,10 +192,10 @@ index 2371f17230358806f05e284f6aca341f18e935c5..567449faf1a5d805c44b5a2685904e91
// SPIGOT-4598 - we should still delegate the shift click handler
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index 6ca8e76d1569f3f631275fea187e7110f09fc69e..3796f8b122ad981b6faacd2afcaf3696314aad6b 100644
index ce70a77ec6da41b59660f5923d30eaebf24c4cc2..94a71073a0d69145cf3429a2b6f646a2dc2015fd 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -490,6 +490,10 @@ public class CraftInventory implements Inventory {
@@ -491,6 +491,10 @@ public class CraftInventory implements Inventory {
return InventoryType.BREWING;
} else if (this.inventory instanceof CraftInventoryCustom.MinecraftInventory) {
return ((CraftInventoryCustom.MinecraftInventory) this.inventory).getType();

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Use Vanilla Minecart Speeds
CraftBukkit changed the values on flying speed, restore back to vanilla
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
index a21bd9753ee9e86b33a66925c05e8494196729be..7d60f56b2e8206e8e546abdd06ea74a2ead6e75d 100644
index 035d5108dce46e0e6d2095d12198cd1762755ba7..39a51f97001ef08f5d2d2eefb25908a3296eec96 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
@@ -103,9 +103,9 @@ public abstract class AbstractMinecart extends Entity {
@@ -102,9 +102,9 @@ public abstract class AbstractMinecart extends Entity {
private double derailedX = 0.5;
private double derailedY = 0.5;
private double derailedZ = 0.5;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Don't allow digging into unloaded chunks
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 53717a4a2bfd841346c00b5f854899e23661122c..3fadf6b46cc722ad81cf810c0761cf717e9f9b78 100644
index 01a321a0c76c55b32922c94297139e85b3d4ac23..514c045883060e4a22f748176091d3b236c2a7fd 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -119,8 +119,8 @@ public class ServerPlayerGameMode {
@ -59,10 +59,10 @@ index 53717a4a2bfd841346c00b5f854899e23661122c..3fadf6b46cc722ad81cf810c0761cf71
this.level.destroyBlockProgress(this.player.getId(), pos, -1);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ed2af4174191dc7f167e8f44edf8f9a894cbc398..4a9c4799ec25820b8ecf6c7e44675b95ba02734c 100644
index 9843684ab5cf21bfc4fe30f3528dc75475b4dcd1..133c6637be1abf3f9b4aa4f73f22b7d64b0438a2 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1675,6 +1675,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1668,6 +1668,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
case START_DESTROY_BLOCK:
case ABORT_DESTROY_BLOCK:
case STOP_DESTROY_BLOCK:

View File

@ -18,10 +18,10 @@ index 1e9105cf5ab2ff0ee847fafd00b41e1bd47f1d9e..65ee888280f917ccd11146505b738951
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index d1f73e325f53c838a6761c0d0f66fd32a887dc51..6a893d44ee85d53ce131ba6c35bbb8c8bfe87b0a 100644
index dc9fce11cb5b76b9e29c0f50c90c96fdf0b830ce..9d778f076512969d8de93256dfde0ebbdb0433ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2622,6 +2622,16 @@ public final class CraftServer implements Server {
@@ -2646,6 +2646,16 @@ public final class CraftServer implements Server {
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
}

View File

@ -101,7 +101,7 @@ index 0e076173033278587df2b5dfbd01cc9005651eb5..dbd8b9b09b82c1b75e8be9dc7416d9f0
public void write(FriendlyByteBuf buf) {
buf.writeByte(this.containerId);
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
index cc2f53fba1e5f6b6d4d31081ddaca1ace70abf99..fef3507dbaeb963ba4132ab7beb26d22ec39d425 100644
index 932cca4d957c1fc212b7a514ea23e8dc7ab5b9d9..f47eeb70661661610ef1a96dd9da67785825c126 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
@@ -50,7 +50,7 @@ public class ClientboundLevelChunkPacketData {

View File

@ -20,10 +20,10 @@ this is going to be the best soultion all around.
Improvements/suggestions welcome!
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 2f2def50a4dde2a949176da1030773e59521fb9a..c9aae32186b72723e879ffab50d73ade5a665a64 100644
index 15d4ad53cca71272e491bea31d83e8c8e697dac0..c7fe091d13349348b7288c0aa8bdde046dc47fa4 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1344,11 +1344,13 @@ public class ServerPlayer extends Player {
@@ -1366,11 +1366,13 @@ public class ServerPlayer extends Player {
}
}
@ -41,10 +41,10 @@ index 2f2def50a4dde2a949176da1030773e59521fb9a..c9aae32186b72723e879ffab50d73ade
if (entity1 != entity && this.connection != null) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index f174af45cd593d8f74205472e25db081b5289ee9..fb67f1d76d683694db13b29bab1d69606b414950 100644
index b8257959acd2b38243fd259f367564080aff951e..d664b8691a8248a035cbe1b12a353f633980ea7b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2381,11 +2381,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2396,11 +2396,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
public void removeVehicle() {
@ -62,7 +62,7 @@ index f174af45cd593d8f74205472e25db081b5289ee9..fb67f1d76d683694db13b29bab1d6960
}
}
@@ -2448,7 +2453,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2467,7 +2472,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return true; // CraftBukkit
}
@ -74,7 +74,7 @@ index f174af45cd593d8f74205472e25db081b5289ee9..fb67f1d76d683694db13b29bab1d6960
if (entity.getVehicle() == this) {
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
} else {
@@ -2458,7 +2466,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2477,7 +2485,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
VehicleExitEvent event = new VehicleExitEvent(
(Vehicle) this.getBukkitEntity(),
@ -83,7 +83,7 @@ index f174af45cd593d8f74205472e25db081b5289ee9..fb67f1d76d683694db13b29bab1d6960
);
// Suppress during worldgen
if (this.valid) {
@@ -2472,7 +2480,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2491,7 +2499,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
// CraftBukkit end
// Spigot start
@ -93,10 +93,10 @@ index f174af45cd593d8f74205472e25db081b5289ee9..fb67f1d76d683694db13b29bab1d6960
if (this.valid) {
Bukkit.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 09c8da5da1557e09af3350b3ac95fc204c590065..b601cfb1795334e284f3396f2175b8b716458ac0 100644
index 2c804ef89d910f706c449b4ce540ed1be3ac242a..3ff18ddb1d4b36fcfd97c9b29f2ecdcb4958916e 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3407,9 +3407,15 @@ public abstract class LivingEntity extends Entity {
@@ -3432,9 +3432,15 @@ public abstract class LivingEntity extends Entity {
@Override
public void stopRiding() {
@ -114,10 +114,10 @@ index 09c8da5da1557e09af3350b3ac95fc204c590065..b601cfb1795334e284f3396f2175b8b7
this.dismountVehicle(entity);
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index cd27f30ededed40a7238b17e08d7d564767a9dab..bd1da2cf2c6717d26b4bba0a1a96e0bbb89cc22e 100644
index 12904581bcf666c31ca6b02e5e0be2f5fe17de34..ba8b6d3fbc10eb9f02d3409eb2038827c47ca14d 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1160,7 +1160,13 @@ public abstract class Player extends LivingEntity {
@@ -1142,7 +1142,13 @@ public abstract class Player extends LivingEntity {
@Override
public void removeVehicle() {

View File

@ -7,10 +7,10 @@ Subject: [PATCH] Add more Zombie API
public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index d3ca0706e8dc3160d2100d23788dd3d501b29215..a8caf1a776deea8684d37406af11ab72c114b07d 100644
index 8ecbb64f9db9346757c5597404489496a0945508..f0bad2264df3a4b4631d66dad46ec03470a206ee 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -94,6 +94,7 @@ public class Zombie extends Monster {
@@ -95,6 +95,7 @@ public class Zombie extends Monster {
private int inWaterTime;
public int conversionTime;
private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
@ -18,7 +18,7 @@ index d3ca0706e8dc3160d2100d23788dd3d501b29215..a8caf1a776deea8684d37406af11ab72
public Zombie(EntityType<? extends Zombie> type, Level world) {
super(type, world);
@@ -262,6 +263,12 @@ public class Zombie extends Monster {
@@ -263,6 +264,12 @@ public class Zombie extends Monster {
super.aiStep();
}
@ -31,7 +31,7 @@ index d3ca0706e8dc3160d2100d23788dd3d501b29215..a8caf1a776deea8684d37406af11ab72
public void startUnderWaterConversion(int ticksUntilWaterConversion) {
this.lastTick = MinecraftServer.currentTick; // CraftBukkit
this.conversionTime = ticksUntilWaterConversion;
@@ -291,9 +298,15 @@ public class Zombie extends Monster {
@@ -292,9 +299,15 @@ public class Zombie extends Monster {
}
public boolean isSunSensitive() {
@ -48,7 +48,7 @@ index d3ca0706e8dc3160d2100d23788dd3d501b29215..a8caf1a776deea8684d37406af11ab72
@Override
public boolean hurt(DamageSource source, float amount) {
if (!super.hurt(source, amount)) {
@@ -413,6 +426,7 @@ public class Zombie extends Monster {
@@ -414,6 +427,7 @@ public class Zombie extends Monster {
nbt.putBoolean("CanBreakDoors", this.canBreakDoors());
nbt.putInt("InWaterTime", this.isInWater() ? this.inWaterTime : -1);
nbt.putInt("DrownedConversionTime", this.isUnderWaterConverting() ? this.conversionTime : -1);
@ -56,7 +56,7 @@ index d3ca0706e8dc3160d2100d23788dd3d501b29215..a8caf1a776deea8684d37406af11ab72
}
@Override
@@ -424,6 +438,11 @@ public class Zombie extends Monster {
@@ -425,6 +439,11 @@ public class Zombie extends Monster {
if (nbt.contains("DrownedConversionTime", 99) && nbt.getInt("DrownedConversionTime") > -1) {
this.startUnderWaterConversion(nbt.getInt("DrownedConversionTime"));
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits
Puts some limits on the size of books.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4a9c4799ec25820b8ecf6c7e44675b95ba02734c..d372d019e714a040d5ae05ed8653b4541717cd61 100644
index 133c6637be1abf3f9b4aa4f73f22b7d64b0438a2..60c9b8d45ae4884883fce1b402bf9ed2906aff79 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1124,6 +1124,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -1116,6 +1116,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleEditBook(ServerboundEditBookPacket packet) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent Enderman from loading chunks
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
index 78a8e5905759d975bb4941b5416fb95ea8c74df5..e0e32528ed9f2f494b5ee2079c3167021f2e84c4 100644
index 4fcd5e1e0641474beeaa834adce73ba10065e34e..1d8cf9b765f9c55feeb26e4ba4aa969be142dc3f 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -493,7 +493,8 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -509,7 +509,8 @@ public class EnderMan extends Monster implements NeutralMob {
int j = Mth.floor(this.enderman.getY() + randomsource.nextDouble() * 2.0D);
int k = Mth.floor(this.enderman.getZ() - 1.0D + randomsource.nextDouble() * 2.0D);
BlockPos blockposition = new BlockPos(i, j, k);
@ -18,7 +18,7 @@ index 78a8e5905759d975bb4941b5416fb95ea8c74df5..e0e32528ed9f2f494b5ee2079c316702
BlockPos blockposition1 = blockposition.below();
BlockState iblockdata1 = world.getBlockState(blockposition1);
BlockState iblockdata2 = this.enderman.getCarriedBlock();
@@ -539,7 +540,8 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -555,7 +556,8 @@ public class EnderMan extends Monster implements NeutralMob {
int j = Mth.floor(this.enderman.getY() + randomsource.nextDouble() * 3.0D);
int k = Mth.floor(this.enderman.getZ() - 2.0D + randomsource.nextDouble() * 4.0D);
BlockPos blockposition = new BlockPos(i, j, k);

View File

@ -16,10 +16,10 @@ intent to remove) and replace it with two new methods, clearly named and
documented as to their purpose.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index c9aae32186b72723e879ffab50d73ade5a665a64..2f6fbceac68e173f3ba3d887407e44b22bfbc5de 100644
index c7fe091d13349348b7288c0aa8bdde046dc47fa4..8aac8dd53b171f05559fb233d47bf1c9e5815a03 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -230,6 +230,7 @@ public class ServerPlayer extends Player {
@@ -235,6 +235,7 @@ public class ServerPlayer extends Player {
public int latency;
public boolean wonGame;
private int containerUpdateDelay; // Paper
@ -28,10 +28,10 @@ index c9aae32186b72723e879ffab50d73ade5a665a64..2f6fbceac68e173f3ba3d887407e44b2
public boolean queueHealthUpdatePacket = false;
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index b71d20841285350d0dfad8d59537f9fcc7a7e44c..4da6c770ff4953b81c4694c665d453ca7d3e532b 100644
index 52708bcdc046cc0a7f3798bfef06e49a6215acfd..43ab48c7f11592c6f0c82243a1d88f48ef175aae 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -179,6 +179,7 @@ public abstract class PlayerList {
@@ -185,6 +185,7 @@ public abstract class PlayerList {
public void placeNewPlayer(Connection connection, ServerPlayer player) {
player.isRealPlayer = true; // Paper
@ -106,10 +106,10 @@ index e7442952ef1f03969949014492a7ddc6d0796ba5..d7823d7dc88cfba6f6ac9dae220e03de
public Location getLastDeathLocation() {
if (this.getData().contains("LastDeathLocation", 10)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0e9538a433e8ef721f29cc7b9f8fac914b876956..e31de5e408b01c2e67d2feec4020796fa74b24d8 100644
index 15da4358e46547fa979dd5023ec6eb5d1358bcb5..7e4cdc2ff30bd85e2ddd271f7b0a531100fdce36 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -174,6 +174,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -176,6 +176,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
private String resourcePackHash;
private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit
@ -117,7 +117,7 @@ index 0e9538a433e8ef721f29cc7b9f8fac914b876956..e31de5e408b01c2e67d2feec4020796f
// Paper end
public CraftPlayer(CraftServer server, ServerPlayer entity) {
@@ -1765,6 +1766,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1767,6 +1768,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
this.firstPlayed = firstPlayed;
}
@ -136,7 +136,7 @@ index 0e9538a433e8ef721f29cc7b9f8fac914b876956..e31de5e408b01c2e67d2feec4020796f
public void readExtraData(CompoundTag nbttagcompound) {
this.hasPlayedBefore = true;
if (nbttagcompound.contains("bukkit")) {
@@ -1787,6 +1800,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1789,6 +1802,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
public void setExtraData(CompoundTag nbttagcompound) {
@ -145,7 +145,7 @@ index 0e9538a433e8ef721f29cc7b9f8fac914b876956..e31de5e408b01c2e67d2feec4020796f
if (!nbttagcompound.contains("bukkit")) {
nbttagcompound.put("bukkit", new CompoundTag());
}
@@ -1801,6 +1816,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1803,6 +1818,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
data.putLong("firstPlayed", this.getFirstPlayed());
data.putLong("lastPlayed", System.currentTimeMillis());
data.putString("lastKnownName", handle.getScoreboardName());

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 2f6fbceac68e173f3ba3d887407e44b22bfbc5de..f6b28eece6dc4f8d1b483ed2bfb6c9504d625bc8 100644
index 8aac8dd53b171f05559fb233d47bf1c9e5815a03..6092167b282a99799c27937dfa1bef424a7e2a9e 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1586,6 +1586,13 @@ public class ServerPlayer extends Player {
@@ -1609,6 +1609,13 @@ public class ServerPlayer extends Player {
public void disconnect() {
this.disconnected = true;
this.ejectPassengers();

View File

@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to
be unintentional in the few cases we've seen so far.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e31de5e408b01c2e67d2feec4020796fa74b24d8..cdc4ef88c8369b3bd1c607ff5301fc1b04ec4582 100644
index 7e4cdc2ff30bd85e2ddd271f7b0a531100fdce36..b9e484ec8173be94fae307830e87a9205e56a11e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2636,6 +2636,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2638,6 +2638,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void resetCooldown() {
getHandle().resetAttackStrengthTicker();
}

View File

@ -11,10 +11,10 @@ floating in the air.
This can replace many uses of BlockPhysicsEvent
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 9ed8117afa4eb1ff9e7403d3ab92a9e6cb0fab73..699df824d2e9fe8b6f6a1ccc8ae7c818c84204cb 100644
index 638a77d3ea65b509b9fcdd3c1e3ea0abe5b7566f..35838b3c858f8dd3c3cb59fe1c4cc8d1d878ff83 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -28,6 +28,7 @@ import net.minecraft.nbt.CompoundTag;
@@ -29,6 +29,7 @@ import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.protocol.Packet;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
@ -22,7 +22,7 @@ index 9ed8117afa4eb1ff9e7403d3ab92a9e6cb0fab73..699df824d2e9fe8b6f6a1ccc8ae7c818
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ChunkHolder;
import net.minecraft.server.level.ServerLevel;
@@ -583,8 +584,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -582,8 +583,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return false;
} else {
FluidState fluid = this.getFluidState(pos);

View File

@ -9,10 +9,10 @@ commands if the server is restarting. Using the default async pool caused issues
due to the shutdown logic generally being much later.
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index 2bf67468a6c745bc6243c65210477ba129bfcb07..c4315531f93f4ed68b4621157b02572886e1ed30 100644
index 9eaa7ad424252ea2e033d6041a14bf1ef7dd9fde..6e931aa7220180336b64fbb3b4090df278fca0fa 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -360,6 +360,24 @@ public class Commands {
@@ -368,6 +368,24 @@ public class Commands {
if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot
// CraftBukkit start
// Register Vanilla commands into builtRoot as before
@ -37,7 +37,7 @@ index 2bf67468a6c745bc6243c65210477ba129bfcb07..c4315531f93f4ed68b4621157b025728
Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues
RootCommandNode vanillaRoot = new RootCommandNode();
@@ -377,7 +395,14 @@ public class Commands {
@@ -385,7 +403,14 @@ public class Commands {
for (CommandNode node : rootcommandnode.getChildren()) {
bukkit.add(node.getName());
}
@ -53,10 +53,10 @@ index 2bf67468a6c745bc6243c65210477ba129bfcb07..c4315531f93f4ed68b4621157b025728
event.getPlayer().getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1dcc7d93038cd0be45ba871c23225395e4751df4..ddd7f78314275e054a1437b633458d8564ef28ca 100644
index f9007905422f7a6eac7c78fd5bdb17cb4da96712..1685f92acdf63decc6cd6b37957ca61212b43bbc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -889,6 +889,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -897,6 +897,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
MinecraftServer.LOGGER.info("Stopping server");

View File

@ -10,7 +10,7 @@ Adds CommandRegisteredEvent
- Allows manipulating the CommandNode to add more children/metadata for the client
diff --git a/build.gradle.kts b/build.gradle.kts
index 6dbac0f93481256dd57e76630ae9eea9d5c56849..e260462933a9f7065b2360e6bf9e4ee56069a705 100644
index 28ca89a36d9cf9b7aca51a21be89e220c8e07589..a4b47b69e14643cd82d71d18941144ecbf50db8b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,6 +8,7 @@ plugins {
@ -59,10 +59,10 @@ index da6250df1c5f3385b683cffde47754bca4606f5e..3384501f83d445f45aa8233e98c7597d
public void removeCommand(String name) {
this.children.remove(name);
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
index a5c31a999dd7fb30436b21c04e2cbc95ee4262d2..891d1fb88d8de9d1b34f300ba640cfc6fbd8a4de 100644
index 36bbe7d0b2089361beda89097c15eca9ab48a57d..b8f5b5895bf75aa8e08b2b0431ef6fdacd235430 100644
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
@@ -39,7 +39,7 @@ import net.minecraft.world.phys.Vec2;
@@ -41,7 +41,7 @@ import net.minecraft.world.phys.Vec2;
import net.minecraft.world.phys.Vec3;
import com.mojang.brigadier.tree.CommandNode; // CraftBukkit
@ -71,8 +71,8 @@ index a5c31a999dd7fb30436b21c04e2cbc95ee4262d2..891d1fb88d8de9d1b34f300ba640cfc6
public static final SimpleCommandExceptionType ERROR_NOT_PLAYER = new SimpleCommandExceptionType(Component.translatable("permissions.requires.player"));
public static final SimpleCommandExceptionType ERROR_NOT_ENTITY = new SimpleCommandExceptionType(Component.translatable("permissions.requires.entity"));
@@ -173,6 +173,26 @@ public class CommandSourceStack implements SharedSuggestionProvider {
return this.entity != null ? this.entity.asChatSender() : ChatSender.SYSTEM;
@@ -171,6 +171,26 @@ public class CommandSourceStack implements SharedSuggestionProvider {
return this.textName;
}
+ // Paper start
@ -99,10 +99,10 @@ index a5c31a999dd7fb30436b21c04e2cbc95ee4262d2..891d1fb88d8de9d1b34f300ba640cfc6
public boolean hasPermission(int level) {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index c4315531f93f4ed68b4621157b02572886e1ed30..b141d251eedd31bd115342b878afd68dc51a8518 100644
index 6e931aa7220180336b64fbb3b4090df278fca0fa..feb9e827357b3ffb76dfff90350e513592441d8e 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -396,6 +396,7 @@ public class Commands {
@@ -404,6 +404,7 @@ public class Commands {
bukkit.add(node.getName());
}
// Paper start - Async command map building
@ -110,7 +110,7 @@ index c4315531f93f4ed68b4621157b02572886e1ed30..b141d251eedd31bd115342b878afd68d
net.minecraft.server.MinecraftServer.getServer().execute(() -> {
runSync(player, bukkit, rootcommandnode);
});
@@ -403,6 +404,7 @@ public class Commands {
@@ -411,6 +412,7 @@ public class Commands {
private void runSync(ServerPlayer player, Collection<String> bukkit, RootCommandNode<SharedSuggestionProvider> rootcommandnode) {
// Paper end - Async command map building
@ -118,7 +118,7 @@ index c4315531f93f4ed68b4621157b02572886e1ed30..b141d251eedd31bd115342b878afd68d
PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit));
event.getPlayer().getServer().getPluginManager().callEvent(event);
@@ -421,6 +423,11 @@ public class Commands {
@@ -429,6 +431,11 @@ public class Commands {
while (iterator.hasNext()) {
CommandNode<CommandSourceStack> commandnode2 = (CommandNode) iterator.next();
@ -131,10 +131,10 @@ index c4315531f93f4ed68b4621157b02572886e1ed30..b141d251eedd31bd115342b878afd68d
if (commandnode2.canUse(source)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index d372d019e714a040d5ae05ed8653b4541717cd61..c959941b6ba5d9ed8e6ce88ff3902afc4c97d139 100644
index 60c9b8d45ae4884883fce1b402bf9ed2906aff79..428f300a33589910eae058b77bb7aa611f2578e7 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -836,8 +836,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -828,8 +828,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
@ -149,7 +149,7 @@ index d372d019e714a040d5ae05ed8653b4541717cd61..c959941b6ba5d9ed8e6ce88ff3902afc
});
});
}
@@ -852,7 +856,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -844,7 +848,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip()));
}
});

View File

@ -10,10 +10,10 @@ This made the Bukkit RecipeChoice API not work for Shapeless.
This reimplements vanilla logic using the same test logic as Shaped
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
index 56835129a63ed22677b7bbd9576c4bdcc8bf5ac7..ffe5476d8ed15ee4384b679c341688787205ce59 100644
index dc4d3034b193562c70a929f0af9420a1e6728f13..e7c06d98532160499f2610f69de27e30a326b16f 100644
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
@@ -76,16 +76,49 @@ public class ShapelessRecipe implements CraftingRecipe {
@@ -84,16 +84,49 @@ public class ShapelessRecipe implements CraftingRecipe {
StackedContents autorecipestackmanager = new StackedContents();
int i = 0;

View File

@ -22,18 +22,18 @@ it only impacts data sent from the client.
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c959941b6ba5d9ed8e6ce88ff3902afc4c97d139..20f67746bd0ab2008a7d433abe6b312cd9b13932 100644
index 428f300a33589910eae058b77bb7aa611f2578e7..a1e75d2c44e854fd7976caa58c8beb618f92e0a0 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -296,6 +296,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
private final LastSeenMessagesValidator lastSeenMessagesValidator;
private final MessageSignatureCache messageSignatureCache;
private final FutureChain chatMessageChain;
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
+ private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
@@ -3296,7 +3297,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3176,7 +3177,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@Override
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {

View File

@ -7,18 +7,18 @@ property lookups arent super cheap. they synchronize, validate
and check security managers.
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index 39bd98b9496e4a27fd69a2de7c83c40689017ebc..831db5ee21938d71e99bf9d17b92a6ca15531740 100644
index 149728fa6371b4d8b0afaae769aacac27401ea03..aca2da47651a76f3e5593d71c500d749d92ccc3b 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -25,6 +25,7 @@ import net.minecraft.world.phys.Vec2;
@@ -26,6 +26,7 @@ import net.minecraft.world.phys.Vec2;
import net.minecraft.world.phys.Vec3;
public class SignBlockEntity extends BlockEntity implements CommandSource { // CraftBukkit - implements
+ private static final boolean CONVERT_LEGACY_SIGNS = Boolean.getBoolean("convertLegacySigns"); // Paper
public static final int LINES = 4;
private static final String[] RAW_TEXT_FIELD_NAMES = new String[]{"Text1", "Text2", "Text3", "Text4"};
@@ -65,7 +66,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
private static final int MAX_TEXT_LINE_WIDTH = 90;
@@ -84,7 +85,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
}
// CraftBukkit start

View File

@ -9,7 +9,7 @@ creating too large of a packet to sed.
Co authored by Spottedleaf
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
index fef3507dbaeb963ba4132ab7beb26d22ec39d425..568ac283baf40e2a89f5b002ffd899eba8008ef2 100644
index f47eeb70661661610ef1a96dd9da67785825c126..0ef3e9b472e35bd2572b04722781abf7d4a1094b 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
@@ -24,6 +24,14 @@ public class ClientboundLevelChunkPacketData {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 4da6c770ff4953b81c4694c665d453ca7d3e532b..8b586272b0f05a12607aa138596ecd5f1e86d0b7 100644
index 43ab48c7f11592c6f0c82243a1d88f48ef175aae..bd880228aaaefb2299b09ce91a58b2da1f04d953 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1129,6 +1129,7 @@ public abstract class PlayerList {
@@ -1139,6 +1139,7 @@ public abstract class PlayerList {
}
public void setUsingWhiteList(boolean whitelistEnabled) {

View File

@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners,
or DEFAULT since data was not stored.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 672f74f89a643ef82d391c521ca45a2beb51a46e..6337d159d2ad0daa70361ee6bad5fc3eb62fa8d3 100644
index f2b20fe0770b519756342c7b900919c6a9d93bdb..6ca2ea98531d28602905f0e68d368d0015a46dcd 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1250,6 +1250,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1290,6 +1290,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
return true;
}
// Paper end
@ -22,10 +22,10 @@ index 672f74f89a643ef82d391c521ca45a2beb51a46e..6337d159d2ad0daa70361ee6bad5fc3e
// Paper start
if (DEBUG_ENTITIES) {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 8b586272b0f05a12607aa138596ecd5f1e86d0b7..fe359cfdc42a86e26a890252ba994ca1fe7726ea 100644
index bd880228aaaefb2299b09ce91a58b2da1f04d953..01cfa93571effead5498e766f6c7e254a5b13479 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -348,7 +348,7 @@ public abstract class PlayerList {
@@ -356,7 +356,7 @@ public abstract class PlayerList {
// CraftBukkit start
ServerLevel finalWorldServer = worldserver1;
Entity entity = EntityType.loadEntityRecursive(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> {
@ -35,7 +35,7 @@ index 8b586272b0f05a12607aa138596ecd5f1e86d0b7..fe359cfdc42a86e26a890252ba994ca1
});
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index fb67f1d76d683694db13b29bab1d69606b414950..d83fc656e70612bbfa93f5ef2cc1161103915004 100644
index d664b8691a8248a035cbe1b12a353f633980ea7b..15625d54c32530eae73d6360ef68ffd1ddf752b0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -74,6 +74,8 @@ import net.minecraft.world.InteractionHand;
@ -55,7 +55,7 @@ index fb67f1d76d683694db13b29bab1d69606b414950..d83fc656e70612bbfa93f5ef2cc11611
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
private CraftEntity bukkitEntity;
@@ -2023,6 +2026,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2038,6 +2041,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
nbt.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
}
@ -65,7 +65,7 @@ index fb67f1d76d683694db13b29bab1d69606b414950..d83fc656e70612bbfa93f5ef2cc11611
// Save entity's from mob spawner status
if (spawnedViaMobSpawner) {
nbt.putBoolean("Paper.FromMobSpawner", true);
@@ -2168,6 +2174,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -2183,6 +2189,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
@ -93,10 +93,10 @@ index fb67f1d76d683694db13b29bab1d69606b414950..d83fc656e70612bbfa93f5ef2cc11611
} catch (Throwable throwable) {
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 9a02dbecd02ffac91a3cb66d988125454b39caf6..67046bad0cfcc8c12bc17edb35b527fc987dddf7 100644
index a985364e5dd4a592e282ad16f0555f842a1d5048..2ae7b8d1129a3549c5ba6fe03455b0b0683c9c31 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -181,6 +181,7 @@ public abstract class BaseSpawner {
@@ -185,6 +185,7 @@ public abstract class BaseSpawner {
// Spigot End
}
entity.spawnedViaMobSpawner = true; // Paper
@ -105,10 +105,10 @@ index 9a02dbecd02ffac91a3cb66d988125454b39caf6..67046bad0cfcc8c12bc17edb35b527fc
// Spigot Start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 2a4f26c5bae66121c5c21d7f1013b3b7753608a4..3bda8128c2956d817677e28ff87c9c5ed61c8bd2 100644
index 9ba0135932571c815fec15d2caccc789d3af3464..e900c64b8b07dc9cf47cc565e60df6781ca95756 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1266,5 +1266,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@@ -1268,5 +1268,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean fromMobSpawner() {
return getHandle().spawnedViaMobSpawner;
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerPostRespawnEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index fe359cfdc42a86e26a890252ba994ca1fe7726ea..f77bbe5ebd3fd93ec6cf92a049b585178c7583d8 100644
index 01cfa93571effead5498e766f6c7e254a5b13479..8e8a4ab377e3d42ba2927745aa903861549de10e 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -728,9 +728,14 @@ public abstract class PlayerList {
@@ -736,9 +736,14 @@ public abstract class PlayerList {
boolean flag2 = false;
@ -24,7 +24,7 @@ index fe359cfdc42a86e26a890252ba994ca1fe7726ea..f77bbe5ebd3fd93ec6cf92a049b58517
ServerLevel worldserver1 = this.server.getLevel(entityplayer.getRespawnDimension());
if (worldserver1 != null) {
Optional optional;
@@ -782,6 +787,7 @@ public abstract class PlayerList {
@@ -790,6 +795,7 @@ public abstract class PlayerList {
location = respawnEvent.getRespawnLocation();
if (!flag) entityplayer.reset(); // SPIGOT-4785
@ -32,7 +32,7 @@ index fe359cfdc42a86e26a890252ba994ca1fe7726ea..f77bbe5ebd3fd93ec6cf92a049b58517
} else {
location.setWorld(worldserver.getWorld());
}
@@ -839,6 +845,13 @@ public abstract class PlayerList {
@@ -849,6 +855,13 @@ public abstract class PlayerList {
if (entityplayer.connection.isDisconnected()) {
this.save(entityplayer);
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items
vanilla checks for == 0
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index 6ecab1dd5932c4c346cde987cb9463b00a32d385..95dc82a0a9bd8a3fa9c704696e7b3dc48bf4d6a0 100644
index 42b056d58146991b86de0690fce595716ee5455b..02bd99934066b35a3f4fd59370cdabf0640ee218 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -114,6 +114,7 @@ public class ItemEntity extends Entity {
@@ -112,6 +112,7 @@ public class ItemEntity extends Entity {
// CraftBukkit start - Use wall time for pickup and despawn timers
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
@ -17,7 +17,7 @@ index 6ecab1dd5932c4c346cde987cb9463b00a32d385..95dc82a0a9bd8a3fa9c704696e7b3dc4
if (this.age != -32768) this.age += elapsedTicks;
this.lastTick = MinecraftServer.currentTick;
// CraftBukkit end
@@ -200,6 +201,7 @@ public class ItemEntity extends Entity {
@@ -198,6 +199,7 @@ public class ItemEntity extends Entity {
// CraftBukkit start - Use wall time for pickup and despawn timers
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events
Fires event at start and end of a server tick
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ddd7f78314275e054a1437b633458d8564ef28ca..412380f4bfe8a2d50090904124242e8b2c7bfa1b 100644
index 1685f92acdf63decc6cd6b37957ca61212b43bbc..e56a03b04e510a510d9deb2a013900241471ac0f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1302,6 +1302,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1309,6 +1309,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
});
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
// Paper end
@ -17,7 +17,7 @@ index ddd7f78314275e054a1437b633458d8564ef28ca..412380f4bfe8a2d50090904124242e8b
++this.tickCount;
this.tickChildren(shouldKeepTicking);
@@ -1340,6 +1341,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1347,6 +1348,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.runAllTasks();
}
// Paper end

View File

@ -11,10 +11,10 @@ Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
public net.minecraft.world.entity.player.Inventory compartments
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index f6b28eece6dc4f8d1b483ed2bfb6c9504d625bc8..7609ab90b8c870876bbaf927df635e2579abbdb7 100644
index 6092167b282a99799c27937dfa1bef424a7e2a9e..5eafbf1fd9b0f54819c9b2d99803c07a1708ce02 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -776,6 +776,46 @@ public class ServerPlayer extends Player {
@@ -798,6 +798,46 @@ public class ServerPlayer extends Player {
});
}
@ -61,7 +61,7 @@ index f6b28eece6dc4f8d1b483ed2bfb6c9504d625bc8..7609ab90b8c870876bbaf927df635e25
@Override
public void die(DamageSource damageSource) {
this.gameEvent(GameEvent.ENTITY_DIE);
@@ -859,7 +899,12 @@ public class ServerPlayer extends Player {
@@ -881,7 +921,12 @@ public class ServerPlayer extends Player {
this.dropExperience();
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
if (!event.getKeepInventory()) {

View File

@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 699df824d2e9fe8b6f6a1ccc8ae7c818c84204cb..7ba3e9a2f974cd469d256dbfbdbfcb05b644c1ba 100644
index 35838b3c858f8dd3c3cb59fe1c4cc8d1d878ff83..9b3a86710d5ac63afee9293f0c2cb1e443c98020 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -845,9 +845,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -898,9 +898,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@Nullable
public BlockEntity getBlockEntity(BlockPos blockposition, boolean validate) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add Heightmap API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ec3ea01033e2c6f2904d4f0a4b0e08bd12b713f7..ce61a2b5b3dfb15e8aeb6816f6c6b1b9e3a9d725 100644
index 00cfc9abb31c7fada8a7e4a99850d5c9f5b71c96..951613887929026805dcb96986cbd9238686c500 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -222,6 +222,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -221,6 +221,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return this.getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING);
}

View File

@ -8,10 +8,10 @@ public net.minecraft.world.level.BaseSpawner isNearPlayer(Lnet/minecraft/world/l
public net.minecraft.world.level.BaseSpawner delay(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)V
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 67046bad0cfcc8c12bc17edb35b527fc987dddf7..2e28bbd75c689ab5a004f0a2de4a89cde7a807ec 100644
index 2ae7b8d1129a3549c5ba6fe03455b0b0683c9c31..c58cd26ac15308d249f7d50fed530a6093091d36 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -235,7 +235,13 @@ public abstract class BaseSpawner {
@@ -239,7 +239,13 @@ public abstract class BaseSpawner {
}
public void load(@Nullable Level world, BlockPos pos, CompoundTag nbt) {
@ -22,11 +22,11 @@ index 67046bad0cfcc8c12bc17edb35b527fc987dddf7..2e28bbd75c689ab5a004f0a2de4a89cd
this.spawnDelay = nbt.getShort("Delay");
+ }
+ // Paper end
boolean flag = nbt.contains("SpawnPotentials", 9);
boolean flag1 = nbt.contains("SpawnData", 10);
boolean flag = nbt.contains("SpawnData", 10);
@@ -271,9 +277,15 @@ public abstract class BaseSpawner {
}
if (flag) {
@@ -262,9 +268,15 @@ public abstract class BaseSpawner {
this.spawnPotentials = SimpleWeightedRandomList.single(this.nextSpawnData != null ? this.nextSpawnData : new SpawnData());
}
+ // Paper start - use ints if set
@ -43,7 +43,7 @@ index 67046bad0cfcc8c12bc17edb35b527fc987dddf7..2e28bbd75c689ab5a004f0a2de4a89cd
this.spawnCount = nbt.getShort("SpawnCount");
}
@@ -290,9 +302,20 @@ public abstract class BaseSpawner {
@@ -281,9 +293,20 @@ public abstract class BaseSpawner {
}
public CompoundTag save(CompoundTag nbt) {
@ -68,7 +68,7 @@ index 67046bad0cfcc8c12bc17edb35b527fc987dddf7..2e28bbd75c689ab5a004f0a2de4a89cd
nbt.putShort("MaxNearbyEntities", (short) this.maxNearbyEntities);
nbt.putShort("RequiredPlayerRange", (short) this.requiredPlayerRange);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
index 6c427b15f78970912bae881f5aba1cfae2a4ba53..0af969746b1984bd5de0510f815b54815c9322bf 100644
index 590d77470e979b331917aaa8cbc30a6513e385db..348c4e10480fe261d557a113e086324236239422 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
@@ -116,4 +116,28 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<SpawnerBlockEnti

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix CB call to changed postToMainThread method
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 48c2451c1a5ffe3ff8eb6748693b2743a9aad4da..34a961446cd9a940c540fa3cb9d008b2d3ff232e 100644
index a1e75d2c44e854fd7976caa58c8beb618f92e0a0..00316713c4f3d444a85b69f222d0b620974c5a27 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -519,7 +519,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -511,7 +511,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
Objects.requireNonNull(this.connection);
// CraftBukkit - Don't wait

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Fix sounds when item frames are modified (MC-123450)
This also fixes the adding sound playing when the item frame direction is changed.
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
index 11638d21d509518809b4d992165913ffec315328..ac0fe310b01506b3b2a767d47f65cefb57f58c7d 100644
index b3f2e45186ed01a18b204a8d23ed57ffc6886703..880ca7cb3ebccc16949e24a0230b1f83887b653f 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
@@ -327,7 +327,7 @@ public class ItemFrame extends HangingEntity {
@@ -328,7 +328,7 @@ public class ItemFrame extends HangingEntity {
this.onItemChanged(itemstack);
this.getEntityData().set(ItemFrame.DATA_ITEM, itemstack);

View File

@ -50,10 +50,10 @@ index 0000000000000000000000000000000000000000..c5b07ec346105d1b95c1c938ffca12a2
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index ba8f9ffed49bf377be8b37532d4f2bdcb8c44d82..4ae3c0b2c240f01a1fcea0b02616e91e057a297a 100644
index 13da02b84d7e748d61fdf5db01d92a8d8cd5c799..2e3b675dca8cec906d533141e158e5db6ae87042 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -644,4 +644,16 @@ public class CraftBlock implements Block {
@@ -646,4 +646,16 @@ public class CraftBlock implements Block {
return iblockdata.canSurvive(world, this.position);
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world
This lets you disable it for some worlds and lower it for others.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 412380f4bfe8a2d50090904124242e8b2c7bfa1b..1a21f7e590aaeca131256dd7079b9546710ca9ad 100644
index e56a03b04e510a510d9deb2a013900241471ac0f..41376a0aaa2da34ec3194d38c59a4ea2f353bd64 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -729,31 +729,34 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -737,31 +737,34 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
public void prepareLevels(ChunkProgressListener worldloadlistener, ServerLevel worldserver) {
@ -54,7 +54,7 @@ index 412380f4bfe8a2d50090904124242e8b2c7bfa1b..1a21f7e590aaeca131256dd7079b9546
if (true) {
ServerLevel worldserver1 = worldserver;
@@ -776,7 +779,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -784,7 +787,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// this.nextTickTime = SystemUtils.getMillis() + 10L;
this.executeModerately();
// CraftBukkit end
@ -64,7 +64,7 @@ index 412380f4bfe8a2d50090904124242e8b2c7bfa1b..1a21f7e590aaeca131256dd7079b9546
// CraftBukkit start
// this.updateMobSpawningFlags();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 6337d159d2ad0daa70361ee6bad5fc3eb62fa8d3..72d3af43afd1b71d92a4d0673795835c6a3a07d0 100644
index 6ca2ea98531d28602905f0e68d368d0015a46dcd..0635f84d062872a9a6e38a9ba3fe71026661e651 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -64,6 +64,7 @@ import net.minecraft.network.protocol.game.ClientboundSoundEntityPacket;
@ -75,7 +75,7 @@ index 6337d159d2ad0daa70361ee6bad5fc3eb62fa8d3..72d3af43afd1b71d92a4d0673795835c
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.ServerScoreboard;
import net.minecraft.server.level.progress.ChunkProgressListener;
@@ -1751,12 +1752,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1727,12 +1728,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
return ((MapIndex) this.getServer().overworld().getDataStorage().computeIfAbsent(MapIndex::load, MapIndex::new, "idcounts")).getFreeAuxValueForMap();
}
@ -200,10 +200,10 @@ index 4d2348df25410a0b5364eec066880326d6667dad..286aad3205ef8a9e21a47ef07893844f
this.maxCount = i * i;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ce61a2b5b3dfb15e8aeb6816f6c6b1b9e3a9d725..f3235c80c6eecdeade88ddafaf39c52beadda684 100644
index 951613887929026805dcb96986cbd9238686c500..31a4424670bbf631845ab0ec61e523d4aeea20f6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1346,15 +1346,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1345,15 +1345,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void setKeepSpawnInMemory(boolean keepLoaded) {

View File

@ -142,12 +142,12 @@ index ddcc212ba83d9365adb842b3d3ced64e3d7dd155..584985272a02eb5b61a22cf2404fbd97
private final ChunkPos pos;
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 9a4f9251d655b86af5a410cfab8df285098e01cc..5a25664a15643ff148db47caad4f53376b55168e 100644
index 1a1ade7538263f4c1a91eb122086a150af3d86ba..8f729134d8f024678f3f5927059791e28ccb5b90 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -11,8 +11,10 @@ import java.nio.file.Files;
import java.nio.file.Path;
@@ -11,8 +11,10 @@ import java.nio.file.Path;
import javax.annotation.Nullable;
import net.minecraft.FileUtil;
import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.NbtIo;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6a893d44ee85d53ce131ba6c35bbb8c8bfe87b0a..c8979c8f51cf07824fc2780c5daccc30922bbd80 100644
index 9d778f076512969d8de93256dfde0ebbdb0433ae..9b5d3dbf302a44d6ed774c8397117e7a6231b2f9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2663,5 +2663,10 @@ public final class CraftServer implements Server {
@@ -2687,5 +2687,10 @@ public final class CraftServer implements Server {
profile.getProperties().putAll(((CraftPlayer)player).getHandle().getGameProfile().getProperties());
return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile);
}

View File

@ -8,10 +8,10 @@ This patch also adds a chunk status cache on region files (note that
its only purpose is to cache the status on DISK)
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 6089512fbae4254f8c8c5266373e2539f479918b..fc50e8a4ae4fd7328276300b585f7b0924e7531f 100644
index 23bbd70dd2dd487caf972c2b1a6c85a1caa3fbcd..7c9b73136b4fc5fda96317001eb8a32245b9768a 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -659,9 +659,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -671,9 +671,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper end
private CompletableFuture<Optional<CompoundTag>> readChunk(ChunkPos chunkPos) {
@ -28,7 +28,7 @@ index 6089512fbae4254f8c8c5266373e2539f479918b..fc50e8a4ae4fd7328276300b585f7b09
}
// CraftBukkit start
@@ -670,6 +674,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -682,6 +686,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// CraftBukkit end
}
@ -144,7 +144,7 @@ index 584985272a02eb5b61a22cf2404fbd97a55a3358..cda87a66fe80bf910f629c64e36c1fec
this.padToFullSector();
} finally {
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index 5a25664a15643ff148db47caad4f53376b55168e..7bfb0716964af5ee300150d500c97e8f90c849d4 100644
index 8f729134d8f024678f3f5927059791e28ccb5b90..b294ef87fb93e7f4651dc04128124f297575860d 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -249,6 +249,7 @@ public class RegionFileStorage implements AutoCloseable {
@ -156,10 +156,10 @@ index 5a25664a15643ff148db47caad4f53376b55168e..7bfb0716964af5ee300150d500c97e8f
} catch (Throwable throwable) {
if (dataoutputstream != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f3235c80c6eecdeade88ddafaf39c52beadda684..7ff5943949aea15d7b8a48f01ce8e8cb98c78532 100644
index 31a4424670bbf631845ab0ec61e523d4aeea20f6..cef2d2494268c968dc8d26f9d5d0ee68a4ad465c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -299,9 +299,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -298,9 +298,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean isChunkGenerated(int x, int z) {
@ -185,7 +185,7 @@ index f3235c80c6eecdeade88ddafaf39c52beadda684..7ff5943949aea15d7b8a48f01ce8e8cb
throw new RuntimeException(ex);
}
}
@@ -415,20 +429,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -414,20 +428,48 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot

View File

@ -17,10 +17,10 @@ This should fully solve all of the issues around it so that only natural
influences natural spawns.
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
index 243ed4b0fbc11b23883aa653e6efc31310c250f1..2d39b7204a5d3967e2fbbd288eb5ff6bf4e324ce 100644
index c3d6b904f1310c93a3d5c1e5e3fab2f3476f5a48..29dac07176eb99517c9cddbe012636908c3603fe 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -87,6 +87,13 @@ public final class NaturalSpawner {
@@ -88,6 +88,13 @@ public final class NaturalSpawner {
MobCategory enumcreaturetype = entity.getType().getCategory();
if (enumcreaturetype != MobCategory.MISC) {

View File

@ -25,10 +25,10 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this
server-internal fix makes this change future-proof.
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
index 9379e887af9c15119bbb158dec88a016e649fb7c..68f3131eb5d3c725279796effff083345edbaec9 100644
index b0caf14a196cd8c3a02d8e931a08857173ffb4da..3eb33d83b9cfa6ac87876a6343c88ac992b60374 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
@@ -161,7 +161,7 @@ public abstract class Projectile extends Entity {
@@ -162,7 +162,7 @@ public abstract class Projectile extends Entity {
this.shoot((double) f5, (double) f6, (double) f7, speed, divergence);
Vec3 vec3d = shooter.getDeltaMovement();

View File

@ -7,10 +7,10 @@ The problem was we were checking isExpired() on the entry, but if it
was expired at that point, then it would be null.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index f77bbe5ebd3fd93ec6cf92a049b585178c7583d8..d1da13e361c4898420e9d6ab8a9c48cb29ae65bf 100644
index 8e8a4ab377e3d42ba2927745aa903861549de10e..4b1a900ce1531526b91b01217f291bc10526956b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -612,8 +612,10 @@ public abstract class PlayerList {
@@ -620,8 +620,10 @@ public abstract class PlayerList {
Player player = entity.getBukkitEntity();
PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.getRawAddress()).getAddress());

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index b601cfb1795334e284f3396f2175b8b716458ac0..35b5671e3bf0b14a073431095bf464f9ebfae843 100644
index 3ff18ddb1d4b36fcfd97c9b29f2ecdcb4958916e..399c34b2837f2b54b452c866c524c51ba813fcc0 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3624,9 +3624,14 @@ public abstract class LivingEntity extends Entity {
@@ -3649,9 +3649,14 @@ public abstract class LivingEntity extends Entity {
}
public void startUsingItem(InteractionHand hand) {
@ -24,7 +24,7 @@ index b601cfb1795334e284f3396f2175b8b716458ac0..35b5671e3bf0b14a073431095bf464f9
this.useItem = itemstack;
this.useItemRemaining = itemstack.getUseDuration();
if (!this.level.isClientSide) {
@@ -3706,6 +3711,7 @@ public abstract class LivingEntity extends Entity {
@@ -3731,6 +3736,7 @@ public abstract class LivingEntity extends Entity {
this.releaseUsingItem();
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
@ -32,7 +32,7 @@ index b601cfb1795334e284f3396f2175b8b716458ac0..35b5671e3bf0b14a073431095bf464f9
this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@@ -3741,8 +3747,8 @@ public abstract class LivingEntity extends Entity {
@@ -3766,8 +3772,8 @@ public abstract class LivingEntity extends Entity {
}
this.stopUsingItem();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Dont send unnecessary sign update
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 34a961446cd9a940c540fa3cb9d008b2d3ff232e..c40da6e0f5da3a6663aba74720c530713b94650b 100644
index 00316713c4f3d444a85b69f222d0b620974c5a27..c6ad5963540b5f51776ba52eefdf7d5be3475906 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3342,6 +3342,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@@ -3214,6 +3214,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (!tileentitysign.isEditable() || !this.player.getUUID().equals(tileentitysign.getPlayerWhoMayEdit())) {
ServerGamePacketListenerImpl.LOGGER.warn("Player {} just tried to change non-editable sign", this.player.getName().getString());

View File

@ -114,31 +114,31 @@ index 06e1774dfbb667aca69bc30c9675ed472cb5728c..1d5bc86516df3781aea894c3afd34042
public static SurfaceRules.RuleSource end() {
diff --git a/src/main/java/net/minecraft/server/Bootstrap.java b/src/main/java/net/minecraft/server/Bootstrap.java
index c5822637e48fad4ca4e8cf210431b5eafbf5abb1..0ece775ca7e63184f79fcdd1aa7ed5c16fc9bc9e 100644
index 0d3a8f576c037886ccdd6068ce953c4ce010ae2f..bf3fa6454477041898ca00a6341db83a06a52d6f 100644
--- a/src/main/java/net/minecraft/server/Bootstrap.java
+++ b/src/main/java/net/minecraft/server/Bootstrap.java
@@ -75,6 +75,7 @@ public class Bootstrap {
EntitySelectorOptions.bootStrap();
@@ -70,6 +70,7 @@ public class Bootstrap {
DispenseItemBehavior.bootStrap();
CauldronInteraction.bootStrap();
+ Registry.register(net.minecraft.core.Registry.CONDITION, new net.minecraft.resources.ResourceLocation("paper", "bedrock_condition_source"), net.minecraft.data.worldgen.SurfaceRuleData.PaperBedrockConditionSource.CODEC.codec()); // Paper - register custom flat bedrock thing. TODO is this the best place to do this?
Registry.freezeBuiltins();
BuiltInRegistries.bootStrap();
+ net.minecraft.core.Registry.register(net.minecraft.core.registries.BuiltInRegistries.MATERIAL_CONDITION, new net.minecraft.resources.ResourceLocation("paper", "bedrock_condition_source"), net.minecraft.data.worldgen.SurfaceRuleData.PaperBedrockConditionSource.CODEC.codec()); // Paper - register custom flat bedrock thing. TODO is this the best place to do this?
Bootstrap.wrapStreams();
}
// CraftBukkit start - easier than fixing the decompile
diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
index 298ea7c5776c4476dbb69e68debbd50376d14165..cf87490a446285132daaf9d90154ac6d477a62fe 100644
index cdc87f14e5d6336856c74d5089e50ae5ebad9923..6b84633bf6956406d2e2c5dd32fa358f41ccc890 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
@@ -210,7 +210,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {
@@ -207,7 +207,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {
@Override
public void buildSurface(WorldGenRegion region, StructureManager structures, RandomState noiseConfig, ChunkAccess chunk) {
if (!SharedConstants.debugVoidTerrain(chunk.getPos())) {
- WorldGenerationContext worldgenerationcontext = new WorldGenerationContext(this, region);
+ WorldGenerationContext worldgenerationcontext = new WorldGenerationContext(this, region, region.getMinecraftWorld()); // Paper
this.buildSurface(chunk, worldgenerationcontext, noiseConfig, structures, region.getBiomeManager(), region.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), Blender.of(region));
this.buildSurface(chunk, worldgenerationcontext, noiseConfig, structures, region.getBiomeManager(), region.registryAccess().registryOrThrow(Registries.BIOME), Blender.of(region));
}
@@ -238,7 +238,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {
@@ -235,7 +235,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator {
return this.createNoiseChunk(ichunkaccess1, structureAccessor, Blender.of(chunkRegion), noiseConfig);
});
Aquifer aquifer = noisechunk.aquifer();

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent sync chunk loads when villagers try to find beds
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java b/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java
index d7c6064710a04a8ecb5b429567467bd497f826a3..4da7f9af12c9bbc3403cdfd4245bd13f011ed89c 100644
index 9012a6347b2f061e88c42d3c237c4b465883e941..6b2b34cb129f807af8042e26a5e180d18e195459 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/SleepInBed.java
@@ -41,7 +41,8 @@ public class SleepInBed extends Behavior<LivingEntity> {
@@ -43,7 +43,8 @@ public class SleepInBed extends Behavior<LivingEntity> {
}
}

Some files were not shown because too many files have changed in this diff Show More