Skip to content

更新 26.1.2#863

Open
HyacinthHaru wants to merge 3 commits into
LeavesMC:masterfrom
HyacinthHaru:upgrade-26.1-v2
Open

更新 26.1.2#863
HyacinthHaru wants to merge 3 commits into
LeavesMC:masterfrom
HyacinthHaru:upgrade-26.1-v2

Conversation

@HyacinthHaru

Copy link
Copy Markdown
Contributor

更新 LeavesMC 到 26.1.2,锚定的是 Paper 的正式版

改动内容包括适配 26.1 API 变更、重做 #855 bytebuf、丢弃 26.1 已被 upstream 吸收的过时补丁、应用 #862 的 piglin(#858) 和 piercing(#859) 修复等

更新 LeavesMC 到 26.1.2,锚定的是 Paper 的 正式版。改动内容包括适配 26.1 API 变更、重做 LeavesMC#855 bytebuf、丢弃 26.1 已被 upstream 吸收的过时补丁、应用 LeavesMC#862 的 piglin(LeavesMC#858) 和 piercing(LeavesMC#859) 修复

@Lumine1909 Lumine1909 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先看这么多 后面涉及假人有点乱 为什么要把改动最大的假人部分扔到后面去.jpg
理论上大改动要放到前面 否则改patch之后rebase可能要处理冲突 (

Comment thread .github/workflows/test.yml Outdated
Comment thread leaves-api/build.gradle.kts.patch
Comment thread leaves-server/minecraft-patches/features/0001-Build-changes.patch
Comment thread leaves-server/minecraft-patches/features/0014-Spawn-invulnerable-time.patch Outdated
重排补丁顺序,恢复 Leaves 名字,清理注释

@Lumine1909 Lumine1909 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

只看了与src的内容和一部分有关的patch
REI部分没细看 (

@@ -34,9 +34,10 @@ public static InteractionResult useItemTo(ServerBot bot, EntityHitResult hitResu

Vec3 vec3 = hitResult.getLocation().subtract(entity.getX(), entity.getY(), entity.getZ());
bot.updateItemInHand(hand);
InteractionResult interactionResult = entity.interactAt(bot, vec3, hand);
// Leaves - Paper 26.1: Entity#interactAt merged into Entity#interact(Player, InteractionHand, Vec3); Player#interactOn also takes Vec3

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

合之前记得删(

}

@Override
public boolean hasClientLoaded() {
return true; // Don't kick me out!
public void tick() {
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一段何意味(

//noinspection ConstantConditions
return BlockEntityType.getKey(this.sleepingBlockEntity.getType()).toString();
return net.minecraft.core.registries.BuiltInRegistries.BLOCK_ENTITY_TYPE.getKey(this.sleepingBlockEntity.getType()).toString();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里可以直接import (

@@ -3,246 +3,183 @@ From: violetc <58360096+s-yh-china@users.noreply.github.com>
Date: Tue, 18 Jul 2023 13:14:15 +0800
Subject: [PATCH] Faster chunk serialization

This patch is Powered by Leaf(https://github.com/Winds-Studio/Leaf)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这一整个patch好像都不太对(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我的我的(

已经改过了,把 LithiumHashPalette 完整还原成 master 版了(

@@ -39,7 +39,7 @@ public final class LithiumHashPalette<T> extends HashMapPalette<T> implements Pa
private int size = 0;

private LithiumHashPalette(int indexBits, T[] entries, Reference2IntOpenHashMap<T> table, int size) {
super(size, true);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

和前面的patch有关 这里应该是不需要动的

@@ -6,6 +6,7 @@
import com.mojang.authlib.HttpAuthenticationService;
import com.mojang.authlib.exceptions.AuthenticationUnavailableException;
import com.mojang.authlib.exceptions.MinecraftClientException;
import com.mojang.authlib.minecraft.client.MinecraftClient; // Leaves - Paper 26.1: YggdrasilMinecraftSessionService#client is now private, use our own MinecraftClient

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该也是patch的问题 我不确定这里能不能这么用 (

@@ -106,7 +105,7 @@ public static Collection<Display> ofTransmuteRecipe(@NotNull RecipeHolder<Transm
* see me.shedaniel.rei.plugin.client.categories.crafting.filler.TippedArrowRecipeFiller#apply
*/
@NotNull
public static Collection<Display> ofTippedArrowRecipe(@NotNull RecipeHolder<TippedArrowRecipe> recipeHolder) {
public static Collection<Display> ofTippedArrowRecipe(@NotNull RecipeHolder<?> recipeHolder) { // Leaves - Paper 26.1: tipped_arrow is now ImbueRecipe, not CustomRecipe

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REI部分需要额外检查(

@@ -142,22 +142,23 @@ public static void refreshWeatherData(ServerPlayer player) {
nbt.putString("id", HudDataPayload.CHANNEL.toString());
nbt.putString("servux", ServuxProtocol.SERVUX_STRING);

if (level.serverLevelData.isRaining() && level.serverLevelData.getRainTime() > -1) {
nbt.putInt("SetRaining", level.serverLevelData.getRainTime());
final net.minecraft.world.level.saveddata.WeatherData weatherData = level.getWeatherData(); // Leaves - Paper 26.1: weather moved to WeatherData

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接import (

packet = new ClientboundSetTimePacket(packet1.dayTime(), recorderOption.forceDayTime, false);
// Leaves - Paper 26.1: SetTimePacket is now (gameTime, Map<Holder<WorldClock>, ClockNetworkState>).
// Replace each world clock with a frozen state at forceDayTime.
packet = new ClientboundSetTimePacket(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里原来好像把dayTime传到gameTime里了 可以参考这里改

// ServerPlayer#3080
    // Adds timeOffset to the beginning of this day.
    return this.level().getDefaultClockTime() - (this.level().getDefaultClockTime() % net.minecraft.SharedConstants.TICKS_PER_GAME_DAY) + this.timeOffset;    

@@ -63,7 +63,7 @@ private static Component getUpdateStatusMessage(@NotNull final String repo, @Not
final Optional<String> gitBranch = build.gitBranch();
final Optional<String> gitCommit = build.gitCommit();
if (gitBranch.isPresent() && gitCommit.isPresent()) {
distance = fetchDistanceFromGitHub(repo, gitBranch.get(), gitCommit.get());
distance = fetchDistanceFromGitHub(gitBranch.get(), gitCommit.get()); // Leaves - Paper 26.1: repo param removed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该也是patch问题 这里需要leaves的repo (

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my fault

fixed(

LeavesMC#863 里面的审查意见进行了落实()
@HyacinthHaru HyacinthHaru requested a review from Lumine1909 June 8, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants