Skip to content

Commit

Permalink
[ci skip] Add more patch identifying comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Jan 23, 2024
1 parent 484d6bf commit 52619e7
Show file tree
Hide file tree
Showing 99 changed files with 360 additions and 393 deletions.
4 changes: 2 additions & 2 deletions patches/server/0050-Add-PlayerInitialSpawnEvent.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ improve setPosition to use raw
public net.minecraft.world.entity.Entity setRot(FF)V

diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index fdf3bf3decb14378f5e59e41bab26e965bc7be14..b74689297ca20efee391fe1da80377082d1758e5 100644
index fdf3bf3decb14378f5e59e41bab26e965bc7be14..ffd73624360e76caef477aeb0074fc8eba13c1c6 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -227,7 +227,7 @@ public abstract class PlayerList {
Expand All @@ -32,7 +32,7 @@ index fdf3bf3decb14378f5e59e41bab26e965bc7be14..b74689297ca20efee391fe1da8037708
+ // Paper start - set raw so we aren't fully joined to the world (not added to chunk or world)
+ player.setPosRaw(loc.getX(), loc.getY(), loc.getZ());
+ player.setRot(loc.getYaw(), loc.getPitch());
+ // Paper end
+ // Paper end - set raw so we aren't fully joined to the world
// Spigot end

// CraftBukkit - Moved message to after join
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Disabling Cat Chest Detection
Offers a gameplay feature to stop cats from blocking chests

diff --git a/src/main/java/net/minecraft/world/level/block/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
index 3d153e5c48bc80ec969de9a32113537e03fb812b..9804ee2020e5cef23d3f5174d153fc149e611503 100644
index 3d153e5c48bc80ec969de9a32113537e03fb812b..305bce4d833116cc21e64fdcdfe13f03e94ff4ba 100644
--- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java
@@ -364,6 +364,11 @@ public class ChestBlock extends AbstractChestBlock<ChestBlockEntity> implements
Expand All @@ -17,7 +17,7 @@ index 3d153e5c48bc80ec969de9a32113537e03fb812b..9804ee2020e5cef23d3f5174d153fc14
+ if (world.getMinecraftWorld().paperConfig().entities.behavior.disableChestCatDetection) {
+ return false;
+ }
+ // Paper end
+ // Paper end - Option to disable chest cat detection
List<Cat> list = world.getEntitiesOfClass(Cat.class, new AABB((double) pos.getX(), (double) (pos.getY() + 1), (double) pos.getZ(), (double) (pos.getX() + 1), (double) (pos.getY() + 2), (double) (pos.getZ() + 1)));

if (!list.isEmpty()) {
8 changes: 4 additions & 4 deletions patches/server/0052-Improve-Player-chat-API-handling.patch
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>

diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index d22341dd864ac3423ec4ae1e3f4febefe24ae3f6..8c8c3085711989c90ea9ae51b3d95abee284a71e 100644
index e8e5773776060b7b6861c80ec736bc5740a262c8..64b5af3745642d2a2e2075cb70ef4defbee64d15 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1937,7 +1937,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Expand All @@ -40,7 +40,7 @@ index d22341dd864ac3423ec4ae1e3f4febefe24ae3f6..8c8c3085711989c90ea9ae51b3d95abe
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e2da717c11f48573babe27d0dac1d679e8eb6964..b80e4acbb67d6f2fbe31b1e518c20d7ec0ec4e49 100644
index 73ed8a00ed83a0f7da7a5f69e743850d7a5b76cc..7e7dfec65f1756e21eb79359e13d429fe1955bba 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -885,7 +885,7 @@ public final class CraftServer implements Server {
Expand All @@ -53,7 +53,7 @@ index e2da717c11f48573babe27d0dac1d679e8eb6964..b80e4acbb67d6f2fbe31b1e518c20d7e
if (this.commandMap.dispatch(sender, commandLine)) {
return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 49d0e2988d2267c4721d8ce37a96eb1d3944ea5a..054ada5455c6570f86d9a010fcb8eaf57bf7151d 100644
index 49d0e2988d2267c4721d8ce37a96eb1d3944ea5a..1ebbd53d545d4b9ac3341c6a68ec97a2f468fb48 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -498,7 +498,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Expand All @@ -74,7 +74,7 @@ index 49d0e2988d2267c4721d8ce37a96eb1d3944ea5a..054ada5455c6570f86d9a010fcb8eaf5
+ this.getHandle().connection.chat(msg, playerChatMessage, false);
+ }
+ }
+ // Paper end
+ // Paper end - Improve chat handling
}

@Override
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Subject: [PATCH] All chunks are slime spawn chunks toggle


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 8b2206c5c56341ecd96837bdb3e0c6ab7c874af5..ef382b08ff8e7f24500aed6752c76e6ffc3f0729 100644
index 8b2206c5c56341ecd96837bdb3e0c6ab7c874af5..897c815fb448d1e9ca75b7f8b93b4021dccf7596 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
@@ -338,7 +338,7 @@ public class Slime extends Mob implements Enemy {
}

ChunkPos chunkcoordintpair = new ChunkPos(pos);
- boolean flag = WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot
+ boolean flag = world.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper
+ boolean flag = world.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper

if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
return checkMobSpawnRules(type, world, spawnReason, pos, random);
Expand Down
10 changes: 5 additions & 5 deletions patches/server/0057-Add-configurable-portal-search-radius.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@ Subject: [PATCH] Add configurable portal search radius


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 450a55fd1b01ac67d911d152a04a3dee3aa0a2e9..6fe0883a6746a31acff7ede501e058b68ad6e78d 100644
index 16fa26878fc7bcf5d22d779ce7b37a59582ba033..927428f11e005fff28f01cfb584a2789aad02afb 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3233,7 +3233,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
double d0 = DimensionType.getTeleportationScale(this.level().dimensionType(), destination.dimensionType());
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
// CraftBukkit start
- CraftPortalEvent event = this.callPortalEvent(this, destination, new Vec3(blockposition.getX(), blockposition.getY(), blockposition.getZ()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag2 ? 16 : 128, 16);
+ // Paper start
+ // Paper start - Configurable portal search radius
+ int portalSearchRadius = destination.paperConfig().environment.portalSearchRadius;
+ if (level.paperConfig().environment.portalSearchVanillaDimensionScaling && flag2) { // == THE_NETHER
+ portalSearchRadius = (int) (portalSearchRadius / destination.dimensionType().coordinateScale());
+ }
+ // Paper end
+ // Paper end - Configurable portal search radius
+ CraftPortalEvent event = this.callPortalEvent(this, destination, new Vec3(blockposition.getX(), blockposition.getY(), blockposition.getZ()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, portalSearchRadius, destination.paperConfig().environment.portalCreateRadius); // Paper start - configurable portal radius
if (event == null) {
return null;
}
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
index 0762bb248b3bd43a06e89aa1893a6189f0e13866..ed5210c63d964be7c28f59df315766794ec3ea1f 100644
index 0762bb248b3bd43a06e89aa1893a6189f0e13866..431f1cf004471dbfb149f697300c3c7fe6bfda4d 100644
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
@@ -43,7 +43,7 @@ public class PortalForcer {

public Optional<BlockUtil.FoundRectangle> findPortalAround(BlockPos pos, boolean destIsNether, WorldBorder worldBorder) {
// CraftBukkit start
- return this.findPortalAround(pos, worldBorder, destIsNether ? 16 : 128); // Search Radius
+ return this.findPortalAround(pos, worldBorder, destIsNether ? level.paperConfig().environment.portalCreateRadius : level.paperConfig().environment.portalSearchRadius); // Search Radius // Paper - search Radius
+ return this.findPortalAround(pos, worldBorder, destIsNether ? level.paperConfig().environment.portalCreateRadius : level.paperConfig().environment.portalSearchRadius); // Search Radius // Paper - Configurable portal search radius
}

public Optional<BlockUtil.FoundRectangle> findPortalAround(BlockPos blockposition, WorldBorder worldborder, int i) {
Loading

0 comments on commit 52619e7

Please sign in to comment.