Skip to content

Commit

Permalink
Add back Leaves Jade protocol support
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Jun 30, 2024
1 parent fae5152 commit fa12f19
Show file tree
Hide file tree
Showing 51 changed files with 32 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Commit: e234432bd99e1c4b07c24d1dd247977226a7516a
This patch is Powered by Jade (https://github.com/Snownee/Jade)

diff --git a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
index 7c7b063b0b563716757294792653a705fe7436f9..0d85300632c6476152e6c1072f84cb75d38dea77 100644
index 642a4ec954f74d37348c59b5f79d6be310ce1d3c..7a26c6dc05ef6a5aea7f5b3d15fa8fdca8e675a3 100644
--- a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
+++ b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
@@ -59,7 +59,7 @@ public class Armadillo extends Animal {
Expand Down Expand Up @@ -854,7 +854,7 @@ index 0000000000000000000000000000000000000000..fd4112ed1911171b3c6b5840b7184b5f
+}
diff --git a/src/main/java/org/leavesmc/leaves/protocol/jade/provider/block/CampfireProvider.java b/src/main/java/org/leavesmc/leaves/protocol/jade/provider/block/CampfireProvider.java
new file mode 100644
index 0000000000000000000000000000000000000000..d22013480b53017db71697af37c0b3daa19c7ac5
index 0000000000000000000000000000000000000000..a1a479987f2c0b6ff4cfd511cbcac1ea7b1c247b
--- /dev/null
+++ b/src/main/java/org/leavesmc/leaves/protocol/jade/provider/block/CampfireProvider.java
@@ -0,0 +1,52 @@
Expand Down Expand Up @@ -894,7 +894,7 @@ index 0000000000000000000000000000000000000000..d22013480b53017db71697af37c0b3da
+ stack = stack.copy();
+
+ CustomData customData = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY)
+ .update(COOKING_TIME_CODEC, campfire.cookingTime[i] - campfire.cookingProgress[i])
+ .update(NbtOps.INSTANCE, COOKING_TIME_CODEC, campfire.cookingTime[i] - campfire.cookingProgress[i])
+ .getOrThrow();
+ stack.set(DataComponents.CUSTOM_DATA, customData);
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ Commit: e234432bd99e1c4b07c24d1dd247977226a7516a
This patch is Powered by AppleSkin (https://github.com/squeek502/AppleSkin)

diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
index c852b3a8d31bc73d32aef215e4d3a82aa1fd8f19..1181ffae40b86a4212e199814d3e07e641a5a1f2 100644
index b63d87d0593d116b0c5ee835dc4372f1b5542453..8923306e497cfa27c912d94d493fca289568b6ac 100644
--- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
+++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
@@ -15,4 +15,7 @@ public class ProtocolSupport implements IConfigModule {
public String getBaseName() {
return "protocol_support";
}
+
@@ -18,4 +18,6 @@ public class ProtocolSupport implements IConfigModule {

@ConfigInfo(baseName = "jade-protocol")
public static boolean jadeProtocol = false;
+ @ConfigInfo(baseName = "appleskin-protocol")
+ public static boolean appleskinProtocol = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ index 44abb103462dc5a2718b3112e94342c39dead554..5075e22ae84191b3d94ce7a8bcbf0ef7
// CraftBukkit start - handle player weather
// entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.START_RAINING, 0.0F));
diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
index 1181ffae40b86a4212e199814d3e07e641a5a1f2..be8474a514e7b9bdacd7cc89d8d3e8b3bc3eb709 100644
index 8923306e497cfa27c912d94d493fca289568b6ac..a509957bd9458c9a2abf080ef2936544be5a148c 100644
--- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
+++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
@@ -4,6 +4,8 @@ import org.dreeam.leaf.config.ConfigInfo;
Expand All @@ -35,8 +35,8 @@ index 1181ffae40b86a4212e199814d3e07e641a5a1f2..be8474a514e7b9bdacd7cc89d8d3e8b3
public class ProtocolSupport implements IConfigModule {

@Override
@@ -18,4 +20,9 @@ public class ProtocolSupport implements IConfigModule {

@@ -20,4 +22,9 @@ public class ProtocolSupport implements IConfigModule {
public static boolean jadeProtocol = false;
@ConfigInfo(baseName = "appleskin-protocol")
public static boolean appleskinProtocol = false;
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Chat Image protocol
This patch is Powered by ChatImage (https://github.com/kitUIN/ChatImage)

diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
index be8474a514e7b9bdacd7cc89d8d3e8b3bc3eb709..9324ca1f1abd2343b2f1eaec019e84428f01c626 100644
index a509957bd9458c9a2abf080ef2936544be5a148c..1c96fd2783b50c071836188663e0bbe966fcfae5 100644
--- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
+++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
@@ -21,6 +21,9 @@ public class ProtocolSupport implements IConfigModule {
@@ -23,6 +23,9 @@ public class ProtocolSupport implements IConfigModule {
@ConfigInfo(baseName = "appleskin-protocol")
public static boolean appleskinProtocol = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Asteor Bar protocol
This patch is Powered by AsteorBar (https://github.com/afoxxvi/AsteorBarMod)

diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
index 9324ca1f1abd2343b2f1eaec019e84428f01c626..45c422b993e254fd892bfd6f47a074f1e9688714 100644
index 1c96fd2783b50c071836188663e0bbe966fcfae5..0a43d2c4f32a8eebaa25ac55e7dc0e00f3c83943 100644
--- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
+++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
@@ -21,6 +21,9 @@ public class ProtocolSupport implements IConfigModule {
@@ -23,6 +23,9 @@ public class ProtocolSupport implements IConfigModule {
@ConfigInfo(baseName = "appleskin-protocol")
public static boolean appleskinProtocol = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Original project: https://github.com/LeavesMC/Leaves
Commit: e234432bd99e1c4b07c24d1dd247977226a7516a

diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c5fa77c350ddab425577659e434df2e0c9878af5..96db8bf0d5c3524a0e010dcdf098dba19f160f95 100644
index bc720b0723cd4e0e9d5f1102e2a520ac0cbac08e..ce36d9186903d28504b8af1bbc84c7ff0454d4be 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -590,7 +590,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Faster Random for xaeroMapServerID generation


diff --git a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
index 45c422b993e254fd892bfd6f47a074f1e9688714..0a9312fd2235ee350df3bf49e846216714ea1120 100644
index 0a43d2c4f32a8eebaa25ac55e7dc0e00f3c83943..b06dce4b44b81b2625327841c7fbdeda50963b2e 100644
--- a/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
+++ b/src/main/java/org/dreeam/leaf/config/modules/network/ProtocolSupport.java
@@ -4,7 +4,7 @@ import org.dreeam.leaf.config.ConfigInfo;
Expand All @@ -17,7 +17,7 @@ index 45c422b993e254fd892bfd6f47a074f1e9688714..0a9312fd2235ee350df3bf49e8462167

public class ProtocolSupport implements IConfigModule {

@@ -30,5 +30,5 @@ public class ProtocolSupport implements IConfigModule {
@@ -32,5 +32,5 @@ public class ProtocolSupport implements IConfigModule {
@ConfigInfo(baseName = "xaero-map-protocol")
public static boolean xaeroMapProtocol = false;
@ConfigInfo(baseName = "xaero-map-server-id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This patch was ported downstream from the Petal fork.
Makes most pathfinding-related work happen asynchronously

diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 4e5dbee1f43b4114a07adab3c3ddc2b9be53ca9c..89ad2a439d774d18a94f66b601d3d17e0f02faaf 100644
index 26a2dbc431146828a79c34543bdabca877b6fa42..37a7fdb543cb39d67716bdbca306d7006cf267bb 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -297,6 +297,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ index 337bd2011c471361653c317004f8380c9fddfc47..52c105f5634ec8495e2e4c05adcc8217
this.updateInWaterStateAndDoFluidPushing();
if (this.isInLava()) {
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 395ccbe442e9c57d11f3f7dc4381b8f6458ad392..69f0d63c5997af88d0c0026722efc1dcdafcb0f8 100644
index bec9696ebca39c96b456ed5f2a6fb06da8362d57..e49a3c0d803caf00070b21422bfa97bdc9ba30bc 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1228,16 +1228,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>
Co-authored by: MachineBreaker <machinebreaker>

diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 69f0d63c5997af88d0c0026722efc1dcdafcb0f8..cb37ffc4c34630e9360c1d74ae4c19d2d543ac9f 100644
index e49a3c0d803caf00070b21422bfa97bdc9ba30bc..338a8b4eff661e18892c3f044e53f0ed4436be6c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -424,17 +424,19 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ index 9c6f5b55b1f1376fa75e216cd366ee47c79fafc4..7762c8186035fdf60e11d9f1844516b6
static RandomSource createThreadSafe() {
return new ThreadSafeLegacyRandomSource(RandomSupport.generateUniqueSeed());
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index cb37ffc4c34630e9360c1d74ae4c19d2d543ac9f..1e355ce1ad99d61c465e28c77b2cc60f14debb99 100644
index 338a8b4eff661e18892c3f044e53f0ed4436be6c..8c6ec4d8f30aa67f5fc3277d3286e33874aaf395 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -127,6 +127,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Fix sprint glitch


diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index a9c2e9d9b3bb63e8cbbe66994c960aca7303066b..16f6afd828575a6a31a56ddc340c80a2024b2158 100644
index 8c424f1eb1ff09c7761fd228279dafb9fe538ad0..66cd72ea5ac5915c2cceda8f4b891ea4266f78cf 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1428,7 +1428,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Add Pufferfish DAB support for Camel, Sniffer
https://github.com/pufferfish-gg/Pufferfish/issues/83

diff --git a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
index 642a4ec954f74d37348c59b5f79d6be310ce1d3c..97e47ee7e44561641d6dc1722e0a7f519e75082d 100644
index 7a26c6dc05ef6a5aea7f5b3d15fa8fdca8e675a3..7e0d6c9527ecbb57d7b748e19fba672b4c078bcc 100644
--- a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
+++ b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
@@ -157,8 +157,10 @@ public class Armadillo extends Animal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ index da026533b15a1981000e73bba6c5209c13de28dc..96d2077abd0112f2b2b8c4678447afbf
return this.level().purpurConfig.frogBreedingTicks;
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
index c51637514bf671c08dbe4e5ac55566b92b5876f9..736e5dbd1587693d33de72ce6a7f8a745e388114 100644
index 5addd3243dd63041442f2a6bcf92a2128e4242c1..2ebce53c728a67a619255a7e8796dcb1a6f82045 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
@@ -95,6 +95,23 @@ public class Tadpole extends AbstractFish {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ now is just updating dirty map/decoration data.
When no bukkit renderers are added to the map, we also re-use the same packet for all players who are tracking it which avoids a lot of work.

diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index 0711b984b607b783c4b437ed14b9fd1d07117868..403dd6de85d6af662d584d357fa5090aa78f1018 100644
index c8082ef01f956750565e82b93f3ce383ff5b2b18..9c6164774d84b18df3cdc6410a09fa2a27598a51 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -112,27 +112,40 @@ public class ServerEntity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The "distanceToSqr" call is a bit expensive, so avoiding it is pretty nice, arou
We could also check if the x,y,z coordinates are equal, but for now, let's just keep the identity check, which also helps us since Minecraft's code does reuse the original delta movement Vec3 object

diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index 403dd6de85d6af662d584d357fa5090aa78f1018..703b19ff3dac81d0ef522cd042fa55a598d615ad 100644
index 9c6164774d84b18df3cdc6410a09fa2a27598a51..e9466ddf836083cf0dcd50921e710abc9f953194 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -219,6 +219,7 @@ public class ServerEntity {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ index 30f984553e823b3c928b0e2181baf5d2058c2d84..3a127806698edefafae06277ce6233fd
} else {
getBukkitEntity().setPlayerListName(prefix + scoreboardName + suffix, true);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 96db8bf0d5c3524a0e010dcdf098dba19f160f95..dad3246bb3e2d0c91fe2200ae6f25f2fcc66d153 100644
index ce36d9186903d28504b8af1bbc84c7ff0454d4be..5d2a21c1d8fdc3f663ebe2cf41162123ba0abb00 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2199,8 +2199,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Block log4j rce exploit in chat


diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index dad3246bb3e2d0c91fe2200ae6f25f2fcc66d153..dee7d17ed0b8b920e6135460c5c20cb178ea54a6 100644
index 5d2a21c1d8fdc3f663ebe2cf41162123ba0abb00..332896faafe5504bd14f0ea286802efd61e2fba7 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2383,6 +2383,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Ignore terminal provider warning


diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index bbe8cd960f9f1e65bc3304ca27befae420bb5677..6b935d3b642d91cf6d928a983376f4a01e07ff23 100644
index f86093a51495a736e8c82afc9fee08e91e1fb697..5c42d739b86e88ca97637696dcf658371cecf535 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -324,6 +324,9 @@ public class Main {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Revert to old console provider, Fix https://github.com/PaperMC/Paper/issues/1040
Solution refers to https://inside.java/2023/07/31/quality-heads-up

diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 6b935d3b642d91cf6d928a983376f4a01e07ff23..aa55df79d2ff18fd1add2e643267d3a1f37f34f2 100644
index 5c42d739b86e88ca97637696dcf658371cecf535..97c7afc78350e25c5853d5c2fe703131af78d531 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -326,6 +326,7 @@ public class Main {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] Use caffeine cache kickPermission instead of using


diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1dcf131335fbeb19f6e01dee921587075df1231c..b362ebbf164c46764c7b918b24cbe1721afc078f 100644
index 332896faafe5504bd14f0ea286802efd61e2fba7..dc8aa1c107e57fba02d62bb1b3716d5d7bc4262b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -338,17 +338,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
Expand Down

0 comments on commit fa12f19

Please sign in to comment.