Skip to content

Commit

Permalink
update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
foss-mc committed Feb 8, 2024
1 parent 259e429 commit 14bd6f0
Show file tree
Hide file tree
Showing 16 changed files with 256 additions and 256 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = patina.patina

version = 1.20.4-R0.1-SNAPSHOT
mcVersion = 1.20.4
paperRef = 61768e08e7cbfd40f9d909d7032df8796536c99c
paperRef = b3c81089ae26cc3ad2e7388c7b64457f3f83c98a

org.gradle.parallel = true
org.gradle.caching = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: foss-mc <[email protected]>
Date: Wed, 27 Dec 2023 00:32:40 +0800
Date: Tue, 6 Feb 2024 15:43:40 +1100
Subject: [PATCH] pufferfish API Changes commit
cf00db8b947df008391625a2fb559d8077afde6d
f5fa99a04ddcc3424bb0fbeea74033f0e5e651a2

Add Sentry

Expand All @@ -22,7 +22,7 @@ This patch does not add any API that should be used by plugins. Any
classes and methods added by this patch should NOT be used in plugins.

diff --git a/build.gradle.kts b/build.gradle.kts
index bf01892c248b988531d21d9fb0f74d0adf2205ac..80833c13a2d19e31d6f648e7ef5b3456025e767e 100644
index 50dd795c67557c7d2668068af0bba87a1ec8dc43..28a3ee2f2df6f93a894793abc03d357a9010a399 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -51,6 +51,7 @@ dependencies {
Expand Down Expand Up @@ -482,7 +482,7 @@ index eaefbb00e9993d54906cc8cf35cf753c0d6c7707..301e82369603f3dd6e6c1bd380da4bac

if (cloader instanceof PluginClassLoader) {
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index f9b57b872780aa6b9b959494874b57c7a8ff0c53..90953bfc81168068a281be4d2d3942d5e7dd69ff 100644
index 7e4f7cb2afbc145e532285c793573ad107bc3033..12449e18180d604e9cbbc744da74a8b222a18e1f 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -50,6 +50,8 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Don't trigger Lootable Refresh for non player interaction
Do not process chat/commands before player has joined

diff --git a/src/main/java/net/minecraft/server/commands/GiveCommand.java b/src/main/java/net/minecraft/server/commands/GiveCommand.java
index d601d287e94a59ff93b8a83a44dac02544d211df..ffa40e12d6750b982828cee38ccaeb14c7ab0ff5 100644
index 1b459a8ee8a6bc039e742d65796bc76660a1c765..f459da26b77e8c10337730738ee878cba77501df 100644
--- a/src/main/java/net/minecraft/server/commands/GiveCommand.java
+++ b/src/main/java/net/minecraft/server/commands/GiveCommand.java
@@ -59,6 +59,7 @@ public class GiveCommand {
Expand All @@ -30,7 +30,7 @@ index d601d287e94a59ff93b8a83a44dac02544d211df..ffa40e12d6750b982828cee38ccaeb14
+ if (true) { continue; } // EMC - never drop items
if (flag && itemstack1.isEmpty()) {
itemstack1.setCount(1);
entityitem = entityplayer.drop(itemstack1, false, false, false); // SPIGOT-2942: Add boolean to call event
entityitem = entityplayer.drop(itemstack1, false, false, false); // CraftBukkit - SPIGOT-2942: Add boolean to call event
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
index b2f08889139dc447f7071f1c81456035bf8de31e..4317aee5a31627e48e1f759e653b9db4b8f9b7e8 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
Expand All @@ -47,7 +47,7 @@ index b2f08889139dc447f7071f1c81456035bf8de31e..4317aee5a31627e48e1f759e653b9db4
+ // EMC end
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
index 1436fdbe31c8cdf05ac56f20224fe91de4b1c0c3..909bc540bfb7b8f638613c070ac97d1eb4faa882 100644
index b41635dd0569ff7df909df492d3e850aef7214be..cac943ffca45def34ac4d88e3bb975cdf2c471b7 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
@@ -68,6 +68,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
Expand All @@ -59,10 +59,10 @@ index 1436fdbe31c8cdf05ac56f20224fe91de4b1c0c3..909bc540bfb7b8f638613c070ac97d1e
net.minecraft.world.level.Level level = this.getLevel();
BlockPos blockPos = this.getBlockPos();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e1fad381b861471a17529c246bb8a4a9c7646420..1fad4e8ccd73946fa5b17caba644354df37e7459 100644
index a139601888b88e8580bdb9c2469386a94abae975..9977403dcc823bd8e637a47e1d01fdb474e787e3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -416,7 +416,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -415,7 +415,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {

@Override
public boolean unloadChunk(int x, int z) {
Expand Down
12 changes: 6 additions & 6 deletions patches/server/0004-Build-changes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Build changes


diff --git a/build.gradle.kts b/build.gradle.kts
index d06e2ac3eb0d218f9982ab3ecc02e35528ea38f9..07894e375b73f03526e0676486cc76b7a58ccd07 100644
index 368eddbcf2fbda9c2060e1a8d17f7d8474b16c73..a27a2134d5b361f5408dc402cb5265267711f46f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -13,8 +13,8 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) {
Expand All @@ -20,20 +20,20 @@ index d06e2ac3eb0d218f9982ab3ecc02e35528ea38f9..07894e375b73f03526e0676486cc76b7
implementation("org.jline:jline-terminal-jansi:3.21.0")
implementation("net.minecrell:terminalconsoleappender:1.3.0")
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 94e95672c3e725b186257b9efb79f5024c4f735f..a54df2303847ffd34c68af7fded34412f52268a6 100644
index e8b77389e8766baabbe6c4ccb1befd95c388fc03..08d94ef45a9663f032551ac1781947203000fcd9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1876,7 +1876,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1864,7 +1864,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa

@DontObfuscate
public String getServerModName() {
- return "Paper"; // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
+ return "Patina"; // Patina - Patina > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
- return "Paper"; // Paper
+ return "Patina"; // Patina
}

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 d0bc077db961ff7b01b25742dbd83aa282cb3897..297e8779a0743662a86869f66c64db266473d97b 100644
index e4d07599c2301bdaecd0e42b4a99081c74f23d37..1d3605d429134afd98ea623ac89b6d4c4b14892a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -264,7 +264,7 @@ import javax.annotation.Nullable; // Paper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ Subject: [PATCH] (Akarin) Swaps the predicate order of collision


diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index b8810cce6f4995d78dca3691b0a1cbd133a05e06..de1605c99e68bf82ab6e6dc1338d785571d7d9c9 100644
index 1d9331fe9ce7308eda2e7da2ae726810d455f090..103dad253aa96665aeb22073bdaefa74332d7cd5 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2118,8 +2118,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2121,8 +2121,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void playerTouch(Player player) {}

public void push(Entity entity) {
- if (!this.isPassengerOfSameVehicle(entity)) {
- if (!entity.noPhysics && !this.noPhysics) {
+ if (!entity.noPhysics && !this.noPhysics && !this.isPassengerOfSameVehicle(entity)) { // Patina - (Akarin) Swaps the predicate order of collision
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper
if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper - Collision option for requiring a player participant
double d0 = entity.getX() - this.getX();
double d1 = entity.getZ() - this.getZ();
@@ -2147,8 +2146,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2150,8 +2149,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
entity.push(d0, 0.0D, d1);
}
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0006-add-Purpur-to-timings-report.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] add Purpur to timings report


diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
index 5af15c85fab72034b97ac210ff775e0a8fa0be78..a4e4e72d873830a41afe589dede7fa155a4f2f1d 100644
index b35a9f4c5f8960864c402ede8a51fb5ab9c4fcc0..7d3100afd7b24e91fdac4452168c3fec52fd022d 100644
--- a/src/main/java/co/aikar/timings/TimingsExport.java
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
@@ -244,6 +244,7 @@ public class TimingsExport extends Thread {
@@ -242,6 +242,7 @@ public class TimingsExport extends Thread {
pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)),
pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null)), // Pufferfish
pair("pufferfish", mapAsJSON(gg.pufferfish.pufferfish.PufferfishConfig.getConfigCopy(), null)) // Pufferfish
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0010-relocate.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] relocate


diff --git a/build.gradle.kts b/build.gradle.kts
index 5ecd6cf4d6f177781b1be5bf046c4a78b82efc43..8b80a5a54922b1b2c110cd66aef4105469e20d2b 100644
index a27a2134d5b361f5408dc402cb5265267711f46f..4cb116c3b2b353fe580cec29fb69b476c18d96f1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -123,6 +123,8 @@ relocation {
@@ -122,6 +122,8 @@ relocation {
relocate("org.bukkit.craftbukkit" to "org.bukkit.craftbukkit.v$craftbukkitPackageVersion") {
exclude("org.bukkit.craftbukkit.Main*")
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0012-fix-building-issue.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] fix building issue


diff --git a/build.gradle.kts b/build.gradle.kts
index 381e1d611a663329cc7c7f446826f6a106d471e5..76804d663d7f42c6affe03c0c6cd9b0f66bd9b0c 100644
index 4cb116c3b2b353fe580cec29fb69b476c18d96f1..71477aee902a90765d2417667c70d17d985304f2 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -53,7 +53,7 @@ dependencies {
@@ -52,7 +52,7 @@ dependencies {

// Pufferfish start
implementation("org.yaml:snakeyaml:1.32")
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0014-lithium-HashedList.patch
Original file line number Diff line number Diff line change
Expand Up @@ -293,15 +293,15 @@ index 0000000000000000000000000000000000000000..2d79932dbd1fc386a94b8d6ea3526934
+ }
+}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index b2b804e1763c1af6c6384364c205ff9fa440a014..0110a7fcaa2802dba5f0d11047adc4d86b60050e 100644
index b34ec447a95e852fcc2cc3e8e2a890ddc8e5ff47..888913eff1a62b7f3b689ba64ce5630a20737897 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -120,9 +120,9 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public static final int TICKS_PER_DAY = 24000;
public static final int MAX_ENTITY_SPAWN_Y = 20000000;
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
- protected final List<TickingBlockEntity> blockEntityTickers = Lists.newArrayList(); public final int getTotalTileEntityTickers() { return this.blockEntityTickers.size(); } // Paper
+ protected final List<TickingBlockEntity> blockEntityTickers = me.jellysquid.mods.lithium.common.util.collections.HashedList.wrapper(Lists.newArrayList()); public final int getTotalTileEntityTickers() { return this.blockEntityTickers.size(); } // Paper // Jettpack - lithium: hashed_list
- public final List<TickingBlockEntity> blockEntityTickers = Lists.newArrayList(); // Paper - public
+ public final List<TickingBlockEntity> blockEntityTickers = me.jellysquid.mods.lithium.common.util.collections.HashedList.wrapper(Lists.newArrayList()); // Paper - public // Jettpack - lithium: hashed_list
protected final NeighborUpdater neighborUpdater;
- private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
+ private final List<TickingBlockEntity> pendingBlockEntityTickers = me.jellysquid.mods.lithium.common.util.collections.HashedList.wrapper(Lists.newArrayList()); // Jettpack - lithium: hashed_list
Expand Down
6 changes: 3 additions & 3 deletions patches/server/0015-lithium-cached_hashcode.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] lithium: cached_hashcode
Original code licensed under GNU Lesser General Public License v3.0 and created for the lithium project: https://github.com/CaffeineMC/lithium-fabric/

diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index 4d50dd92a7f3187ee1d8edb926e7c273c8156549..e0bdb86602465061792cdc11b6b5c3808afd6c00 100644
index 73d6f881a7d4d8ff96040d34ac502e5b0937d577..2653798bc5454dccf97e73c39514394eb2c3f1c8 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -606,11 +606,18 @@ public class Block extends BlockBehaviour implements ItemLike {
@@ -614,11 +614,18 @@ public class Block extends BlockBehaviour implements ItemLike {
private final BlockState first;
private final BlockState second;
private final Direction direction;
Expand All @@ -28,7 +28,7 @@ index 4d50dd92a7f3187ee1d8edb926e7c273c8156549..e0bdb86602465061792cdc11b6b5c380
}

public boolean equals(Object object) {
@@ -626,11 +633,7 @@ public class Block extends BlockBehaviour implements ItemLike {
@@ -634,11 +641,7 @@ public class Block extends BlockBehaviour implements ItemLike {
}

public int hashCode() {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0017-rebrand-implementation-version.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] rebrand implementation version


diff --git a/build.gradle.kts b/build.gradle.kts
index 1ce25e619450bfd192a5136da740231acfc500ae..dfd8ea5314e7819b5f198034a1550266d0a8a081 100644
index 71477aee902a90765d2417667c70d17d985304f2..57beb8a1c12e4935c37363bf62bd7ed6f45e829a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -86,7 +86,7 @@ tasks.jar {
@@ -85,7 +85,7 @@ tasks.jar {
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
"Implementation-Title" to "CraftBukkit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Original project: https://github.com/Akarin-project/Akarin
Original project: https://github.com/Winds-Studio/Leaf

diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java
index 665120a62525f56912263a3e1b6f12f6c3e15dec..96f43abadbfb96834945166a25a286564f6273b8 100644
index 35f973cc2c0989256fa21abaf0327c2f36dbe4c9..e9fd7ef5365c051686896a2f986b02dfd110f2b3 100644
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
+++ b/src/main/java/net/minecraft/server/players/StoredUserList.java
@@ -23,6 +23,7 @@ import java.util.Objects;
Expand All @@ -20,7 +20,7 @@ index 665120a62525f56912263a3e1b6f12f6c3e15dec..96f43abadbfb96834945166a25a28656
import net.minecraft.util.GsonHelper;
import org.slf4j.Logger;

@@ -126,37 +127,43 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
@@ -103,37 +104,43 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
}

public void save() throws IOException {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0019-lithium-entity.fast_hand_swing.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] lithium: entity.fast_hand_swing
Original code licensed under GNU Lesser General Public License v3.0 and created for the lithium project: https://github.com/CaffeineMC/lithium-fabric/

diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index e24e20a63b74e82afb7f911d286b9bdf72d87afb..f257b875549714f5361d92c26a1fd194b8d0eb06 100644
index 5641bc7f50cef7819ddaeb76a4a4f9c80f473d31..b649cc058d345162127735d291902f9015d5242a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2537,6 +2537,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -2538,6 +2538,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}

protected void updateSwingTime() {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0020-fix-rebuild-issue-temporarily.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] fix rebuild issue (temporarily)


diff --git a/build.gradle.kts b/build.gradle.kts
index dfd8ea5314e7819b5f198034a1550266d0a8a081..2621ee359c6cbe0db10abcd6c14d0e910c87304f 100644
index 57beb8a1c12e4935c37363bf62bd7ed6f45e829a..d87904ebc02dbc817d61224ead776b8cfedf2829 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -228,7 +228,5 @@ val runtimeClasspathForRunDev = sourceSets.main.flatMap { src ->
@@ -227,7 +227,5 @@ val runtimeClasspathForRunDev = sourceSets.main.flatMap { src ->
}
tasks.registerRunTask("runDev") {
description = "Spin up a non-relocated Mojang-mapped test server"
Expand Down

0 comments on commit 14bd6f0

Please sign in to comment.