Skip to content

Commit

Permalink
Updated Upstream (Gale/Leaves)
Browse files Browse the repository at this point in the history
Upstream has released updates that appear to apply and compile correctly

Gale Changes:
Dreeam-qwq/Gale@9c48e95c Update LithiumHashPalette

Leaves Changes:
LeavesMC/Leaves@74cb952f Fix some protocol
LeavesMC/Leaves@99b3aafc Fix bot action, and entity tickCount
  • Loading branch information
Dreeam-qwq committed Feb 7, 2025
1 parent 1440388 commit 81be1d3
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 15 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=cn.dreeam.leaf
mcVersion=1.21.4
version=1.21.4-R0.1-SNAPSHOT

galeCommit=57be1e6f9c39bca76bb15c965e44f2dba521b293
galeCommit=9c48e95c26a5fea9b99660b019ee909c25448d51

org.gradle.configuration-cache=true
org.gradle.caching=true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and change store way to sql maybe?
Original license: GPLv3
Original project: https://github.com/LeavesMC/Leaves

Commit: f07c26c892bc919de82ee0c90ccd5bdca41f20ed
Commit: 99b3aafce1f162c68a771fe56d77f33648636b7d

diff --git a/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java b/net/minecraft/network/protocol/common/custom/CustomPacketPayload.java
index fb263fa1f30a7dfcb7ec2656abfb38e5fe88eac9..7e19dfe90a63ff26f03b95891dacb7360bba5a3c 100644
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ index 622257dbbe572de33e15abef9055016268730261..dfb4524d80f642eff1b146dd2fbfa07f
private final ServerStatsCounter stats;
private float lastRecordedHealthAndAbsorption = Float.MIN_VALUE;
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
index e3d09d5f4efb32bb276e001e5ee747a775b502ee..86ce80765eb7645533806f730b15557f8ea6a9a2 100644
index e3d09d5f4efb32bb276e001e5ee747a775b502ee..78b15d750d75e5d4c2318a3a18e83afdd5f4fbe1 100644
--- a/net/minecraft/server/players/PlayerList.java
+++ b/net/minecraft/server/players/PlayerList.java
@@ -132,6 +132,7 @@ public abstract class PlayerList {
Expand All @@ -206,7 +206,7 @@ index e3d09d5f4efb32bb276e001e5ee747a775b502ee..86ce80765eb7645533806f730b15557f

abstract public void loadAndSaveFiles(); // Paper - fix converting txt to json file; moved from DedicatedPlayerList constructor

+ // Leaves start - replay api
+ // Leaves start - replay mod api
+ public void placeNewPhotographer(Connection connection, org.leavesmc.leaves.replay.ServerPhotographer player, ServerLevel worldserver) {
+ player.isRealPlayer = true; // Paper
+ player.loginTime = System.currentTimeMillis(); // Paper
Expand Down Expand Up @@ -304,7 +304,7 @@ index e3d09d5f4efb32bb276e001e5ee747a775b502ee..86ce80765eb7645533806f730b15557f
+ );
+ }
+ }
+ // Leaves end - replay api
+ // Leaves end - replay mod api
+
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie cookie) {
player.isRealPlayer = true; // Paper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ public void write(FriendlyByteBuf buf) {
CODEC.encode(ProtocolUtils.decorate(buf), this);
}

@New
public static RequestBlockPayload create(ResourceLocation location, FriendlyByteBuf buf) {
return CODEC.decode(ProtocolUtils.decorate(buf));
}

@Override
@NotNull
public ResourceLocation id() {
return PACKET_REQUEST_BLOCK;
}
}

@New
public static RequestBlockPayload create(ResourceLocation location, FriendlyByteBuf buf) {
return CODEC.decode(ProtocolUtils.decorate(buf));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,15 @@ public void write(FriendlyByteBuf buf) {
CODEC.encode(ProtocolUtils.decorate(buf), this);
}

@New
public static RequestEntityPayload create(ResourceLocation location, FriendlyByteBuf buf) {
return CODEC.decode(ProtocolUtils.decorate(buf));
}

@Override
@NotNull
public ResourceLocation id() {
return PACKET_REQUEST_ENTITY;
}

@New
public static RequestEntityPayload create(ResourceLocation location, FriendlyByteBuf buf) {
return CODEC.decode(ProtocolUtils.decorate(buf));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ public void write(FriendlyByteBuf buf) {
public ResourceLocation id() {
return PACKET_SERVER_HANDSHAKE;
}

@New
public static ServerHandshakePayload create(ResourceLocation location, FriendlyByteBuf buf) {
return CODEC.decode(ProtocolUtils.decorate(buf));
}
}

0 comments on commit 81be1d3

Please sign in to comment.