Skip to content

Commit

Permalink
Update Paper
Browse files Browse the repository at this point in the history
  • Loading branch information
s-yh-china committed Jul 5, 2023
1 parent 0429830 commit e261a92
Show file tree
Hide file tree
Showing 22 changed files with 82 additions and 82 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ version=1.20.1-R0.1-SNAPSHOT
mcVersion=1.20.1
packageVersion=1_20_R1
org.gradle.jvmargs=-Xmx2G
paperRef=f2c1e1366ad4139614eafe677daf35aa873718f0
paperRef=12c970097d5044bf4124169745ad63efffc4a4ad
preVersion=false
4 changes: 2 additions & 2 deletions patches/api/0001-Leaves-Server-Config.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Leaves Server Config


diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 5b225bbb128893d67251a96ab318035802a0cf76..d08e1fd95d9a3588bc54a078cfa93508ab1c86f9 100644
index 6b72eccdcb6f75534a4267a1dd0a4cc2f39e917b..3c4915b8dd1b6e802a5942658b15d3a9db472364 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2006,6 +2006,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
@@ -2029,6 +2029,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
throw new UnsupportedOperationException("Not supported yet.");
}
// Paper end
Expand Down
16 changes: 8 additions & 8 deletions patches/server/0001-Build-changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Subject: [PATCH] Build changes


diff --git a/build.gradle.kts b/build.gradle.kts
index 6d3d573ffc118e7f4d76422dc014a7df0384bb49..b688eeae8034128318925ad83d308332dfe043d0 100644
index 57f2c414dbfe127c193002fbc8eeb22e94e9cb55..bb4447f7648dc4bb33c5e0e3687435e3c470fa9c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -7,8 +7,12 @@ plugins {
}
@@ -13,8 +13,12 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
val alsoShade: Configuration by configurations.creating

dependencies {
- implementation(project(":paper-api"))
Expand All @@ -23,7 +23,7 @@ index 6d3d573ffc118e7f4d76422dc014a7df0384bb49..b688eeae8034128318925ad83d308332
// Paper start
implementation("org.jline:jline-terminal-jansi:3.21.0")
implementation("net.minecrell:terminalconsoleappender:1.3.0")
@@ -58,13 +62,13 @@ tasks.jar {
@@ -66,13 +70,13 @@ tasks.jar {
manifest {
val git = Git(rootProject.layout.projectDirectory.path)
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
Expand All @@ -39,7 +39,7 @@ index 6d3d573ffc118e7f4d76422dc014a7df0384bb49..b688eeae8034128318925ad83d308332
"Implementation-Vendor" to date, // Paper
"Specification-Title" to "Bukkit",
"Specification-Version" to project.version,
@@ -136,7 +140,7 @@ fun TaskContainer.registerRunTask(
@@ -149,7 +153,7 @@ fun TaskContainer.registerRunTask(
name: String,
block: JavaExec.() -> Unit
): TaskProvider<JavaExec> = register<JavaExec>(name) {
Expand Down Expand Up @@ -92,10 +92,10 @@ index 3238cbcba567b1242c77e41f6b6f19a8d157fb4e..670f25370554c3f8c40d2fcc4f5a31d7

public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 0859f11567aecc8cae993a1409cfac7c53ab3dd5..b1f34ee7a421c35eb3ee7ab112defe48d935c788 100644
index a05c1bc8874ef5e380544a6a344c848e37da49c4..22402d237f036be3dcbaea3a63718e615766981c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -261,7 +261,7 @@ import javax.annotation.Nullable; // Paper
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
import javax.annotation.Nonnull; // Paper

public final class CraftServer implements Server {
Expand All @@ -105,7 +105,7 @@ index 0859f11567aecc8cae993a1409cfac7c53ab3dd5..b1f34ee7a421c35eb3ee7ab112defe48
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index d4f6935a1bea77e5118bfd538f9b1358c21591a7..a53514f2c510b29f596c361de7bc0b405c27e964 100644
index daed278d1bcf84ee42749f24e311b22b70015d79..35d2da9d91dcdd89de7c0f4af028fd182376ea8d 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -292,7 +292,7 @@ public class Main {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0002-Leaves-Server-Utils.patch
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ index 46954db7ecd35ac4018fdf476df7c8020d7ce6c8..044c51ebb058fc36074fd178929e3279
public PlayerAreaMap() {
super();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 6abaf7ef99800a238b29dbbb85de8c970c0806a7..f3ef56b6c21b0bd1945716b50f14de106bcb525c 100644
index 3ffb92a82e17af467afb18c81accc482a93d6a6f..33f657e1a5d7676db00c37f6c8a12abdb9b2374f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -417,6 +417,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
Expand Down Expand Up @@ -62,7 +62,7 @@ index 6abaf7ef99800a238b29dbbb85de8c970c0806a7..f3ef56b6c21b0bd1945716b50f14de10

} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
@@ -4806,4 +4813,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4789,4 +4796,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this);
}
// Paper end
Expand Down
12 changes: 6 additions & 6 deletions patches/server/0004-Leaves-Server-Config-And-Command.patch
Original file line number Diff line number Diff line change
Expand Up @@ -65,34 +65,34 @@ index 147d802d9207e358fdb2d1c7806fc2f634dcfd98..4f0a2c9b352f5824ec0c30d0f0af0fe1
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b1f34ee7a421c35eb3ee7ab112defe48d935c788..7623ebe3bfc508183f67b84e1f1815697ed98ba8 100644
index 22402d237f036be3dcbaea3a63718e615766981c..a394fcb1afe37efda30893e06352941f1a049319 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1053,6 +1053,7 @@ public final class CraftServer implements Server {
@@ -1056,6 +1056,7 @@ public final class CraftServer implements Server {

org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
+ top.leavesmc.leaves.LeavesConfig.init((File) console.options.valueOf("leaves-settings")); // Leaves - Server Config
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
@@ -1068,6 +1069,7 @@ public final class CraftServer implements Server {
@@ -1071,6 +1072,7 @@ public final class CraftServer implements Server {
}
}
world.spigotConfig.init(); // Spigot
+ world.leavesConfig.init(); // Leaves - World Config
}

Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -1083,6 +1085,7 @@ public final class CraftServer implements Server {
@@ -1086,6 +1088,7 @@ public final class CraftServer implements Server {
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
+ top.leavesmc.leaves.LeavesConfig.registerCommands(); // Leaves - Server Command
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");

@@ -2849,6 +2852,14 @@ public final class CraftServer implements Server {
@@ -2863,6 +2866,14 @@ public final class CraftServer implements Server {
{
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
}
Expand All @@ -108,7 +108,7 @@ index b1f34ee7a421c35eb3ee7ab112defe48d935c788..7623ebe3bfc508183f67b84e1f181569
@Override
public void restart() {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index a53514f2c510b29f596c361de7bc0b405c27e964..269c7ba0707db4fdc45a70000e0be892b6dfa31d 100644
index 35d2da9d91dcdd89de7c0f4af028fd182376ea8d..d73482fb1e71fe2951e96ae0593de268d533e5f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -165,6 +165,14 @@ public class Main {
Expand Down
10 changes: 5 additions & 5 deletions patches/server/0005-Fix-gravity-block-duper.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Fix gravity block duper


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ca82b601e99a64038e71b051510f6d1cc57b2f8f..8a30a18a24986f0c54483f69410e5dace4e4ca38 100644
index 33f657e1a5d7676db00c37f6c8a12abdb9b2374f..b93be8c7da98c4b56d1a6fd74c32509c8d59f853 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -531,36 +531,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
Expand Down Expand Up @@ -46,7 +46,7 @@ index ca82b601e99a64038e71b051510f6d1cc57b2f8f..8a30a18a24986f0c54483f69410e5dac

public Entity(EntityType<?> type, Level world) {
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
@@ -3086,7 +3058,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -3069,7 +3041,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}

this.processPortalCooldown();
Expand All @@ -56,10 +56,10 @@ index ca82b601e99a64038e71b051510f6d1cc57b2f8f..8a30a18a24986f0c54483f69410e5dac
}

diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index eff81e846f696349b3bd3d26c02442f157b169f0..652070db14065a66b46ffcebbb2c0c2ad2db6f2a 100644
index 18eaccb39a4c81338a8cbebe3de03934913ac2a4..34c62ba8d659c3df37243c3abf4cdd705b3ddf8c 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -130,11 +130,7 @@ public class FallingBlockEntity extends Entity {
@@ -132,11 +132,7 @@ public class FallingBlockEntity extends Entity {

@Override
public void tick() {
Expand All @@ -72,7 +72,7 @@ index eff81e846f696349b3bd3d26c02442f157b169f0..652070db14065a66b46ffcebbb2c0c2a
if (this.blockState.isAir()) {
this.discard();
} else {
@@ -147,11 +143,7 @@ public class FallingBlockEntity extends Entity {
@@ -149,11 +145,7 @@ public class FallingBlockEntity extends Entity {

this.move(MoverType.SELF, this.getDeltaMovement());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Add isShrink to EntityResurrectEvent


diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 064bd3f2615009b3f15f3a5006f0b5f7a7ba6bf5..a8c0b64f86a64b33d3b262c2b3e8b2bc61a4e3dd 100644
index e11d7283662834047b2ff81a2fd25a4263792deb..d7861680dc319c22fa257e91b4ddc0caee20ef23 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1587,12 +1587,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1577,12 +1577,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
}

org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null;
Expand All @@ -23,7 +23,7 @@ index 064bd3f2615009b3f15f3a5006f0b5f7a7ba6bf5..a8c0b64f86a64b33d3b262c2b3e8b2bc
itemstack1.shrink(1);
}
if (itemstack != null && this instanceof ServerPlayer) {
@@ -4461,3 +4461,4 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -4451,3 +4451,4 @@ public abstract class LivingEntity extends Entity implements Attackable {

}
}
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0022-Optimize-suffocation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize suffocation
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)

diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 67bf9ff852e190d89c877b86d9bfee07d6282430..903299fd5357b9955538aa20ec790672867bf394 100644
index d7861680dc319c22fa257e91b4ddc0caee20ef23..e443253ee52892cc234bda9d930dda445d03b051 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -415,7 +415,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -414,7 +414,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
boolean flag = this instanceof net.minecraft.world.entity.player.Player;

if (!this.level().isClientSide) {
Expand All @@ -18,7 +18,7 @@ index 67bf9ff852e190d89c877b86d9bfee07d6282430..903299fd5357b9955538aa20ec790672
this.hurt(this.damageSources().inWall(), 1.0F);
} else if (flag && !this.level().getWorldBorder().isWithinBounds(this.getBoundingBox())) {
double d0 = this.level().getWorldBorder().getDistanceToBorder(this) + this.level().getWorldBorder().getDamageSafeZone();
@@ -1370,6 +1370,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1369,6 +1369,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.getHealth() <= 0.0F;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Strip raytracing for EntityLiving#hasLineOfSight
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)

diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index f3a45bcc878e08318304dcbd1be1e19332d8dac7..f503ca69070091a5f5787bdffb5c6cd3a5777b4b 100644
index e443253ee52892cc234bda9d930dda445d03b051..ef324b40917b3abf3b3d25dda3c8c258bdbc443e 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3670,7 +3670,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -3660,7 +3660,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());

// Paper - diff on change - used in CraftLivingEntity#hasLineOfSight(Location) and CraftWorld#lineOfSightExists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Only check for spooky season once an hour
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)

diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
index 940cd932e74bc2e6754186731d7aa6f10d56eb68..bbab018a5fb58a56a8083f570d621bba11f9ca9a 100644
index 5beaa849a250ea005733250ad3edfa8382224667..f124d17106edc490e90376bbbaba6912f0579d16 100644
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
@@ -251,13 +251,30 @@ public class Bat extends AmbientCreature {
@@ -237,13 +237,30 @@ public class Bat extends AmbientCreature {
}
}

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0038-Cache-climbing-check-for-activation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Cache climbing check for activation
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)

diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index f503ca69070091a5f5787bdffb5c6cd3a5777b4b..45d98f2cdde569ebe863a8f74c7f9e145c7763f8 100644
index ef324b40917b3abf3b3d25dda3c8c258bdbc443e..dfce80a9e4736f8545d20713ebd4d4d0fd377a10 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1984,6 +1984,22 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -1974,6 +1974,22 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.lastClimbablePos;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Reduce entity fluid lookups if no fluids
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)

diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 93fd2397d977b30b56820fff71c01ac1d54d129d..6addc14f1c6366da14662c445bc90d3017e7ac72 100644
index a26ec93b1914492606499f3ecbbac3a1836295d4..afecf33c1df964decad84636c4e588369ad5ea8a 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4312,16 +4312,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4295,16 +4295,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
}

public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
Expand All @@ -35,7 +35,7 @@ index 93fd2397d977b30b56820fff71c01ac1d54d129d..6addc14f1c6366da14662c445bc90d30
double d1 = 0.0D;
boolean flag = this.isPushedByFluid();
boolean flag1 = false;
@@ -4329,38 +4331,123 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@@ -4312,38 +4314,123 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
int k1 = 0;
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0041-Reduce-chunk-loading-lookups.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Reduce chunk loading & lookups
This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish)

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 4616addb05fcc20b1ec6ca1dea01cbefed697acd..2fce5952352ca09335d3ba74e6d779c447b1a734 100644
index 39eb9301626b191958ce42daa34b1ff3241cea80..7e19c96e92f821836702969aef4628f29155e519 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -322,11 +322,28 @@ public class EnderMan extends Monster implements NeutralMob {
@@ -326,11 +326,28 @@ public class EnderMan extends Monster implements NeutralMob {
private boolean teleport(double x, double y, double z) {
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos(x, y, z);

Expand Down
Loading

0 comments on commit e261a92

Please sign in to comment.