diff --git a/leaves-server/minecraft-patches/features/0057-Container-open-passthrough.patch b/leaves-server/minecraft-patches/features/0057-Container-open-passthrough.patch index ca4404f6..5c5dc253 100644 --- a/leaves-server/minecraft-patches/features/0057-Container-open-passthrough.patch +++ b/leaves-server/minecraft-patches/features/0057-Container-open-passthrough.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Container open passthrough diff --git a/net/minecraft/world/entity/decoration/ItemFrame.java b/net/minecraft/world/entity/decoration/ItemFrame.java -index 90fd3ca5ecd29befa9237222e9f86a8a79a011e4..96524408ceae907d92f7554b1084ee1519d7b572 100644 +index 90fd3ca5ecd29befa9237222e9f86a8a79a011e4..cc26f2bfd8992207fffd74b89752275abe2be623 100644 --- a/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/net/minecraft/world/entity/decoration/ItemFrame.java @@ -412,6 +412,20 @@ public class ItemFrame extends HangingEntity { @@ -14,10 +14,10 @@ index 90fd3ca5ecd29befa9237222e9f86a8a79a011e4..96524408ceae907d92f7554b1084ee15 } else { + // Leaves start - itemFrameContainerPassthrough + if (org.leavesmc.leaves.LeavesConfig.modify.containerPassthrough && !player.isShiftKeyDown()) { -+ BlockPos pos1 = this.pos.relative(this.direction.getOpposite()); ++ BlockPos pos1 = this.pos.relative(this.getDirection().getOpposite()); + if (level().getBlockEntity(pos1) instanceof net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity) { + BlockState blockState = level().getBlockState(pos1); -+ net.minecraft.world.phys.BlockHitResult hitResult = new net.minecraft.world.phys.BlockHitResult(Vec3.atCenterOf(pos1), this.direction, pos1, false); ++ net.minecraft.world.phys.BlockHitResult hitResult = new net.minecraft.world.phys.BlockHitResult(Vec3.atCenterOf(pos1), this.getDirection(), pos1, false); + if (flag1) { + return blockState.useItemOn(itemInHand, level(), player, hand, hitResult); + } else { diff --git a/leaves-server/minecraft-patches/features/0059-Faster-chunk-serialization.patch b/leaves-server/minecraft-patches/features/0059-Faster-chunk-serialization.patch index 578b32e1..bfbe12da 100644 --- a/leaves-server/minecraft-patches/features/0059-Faster-chunk-serialization.patch +++ b/leaves-server/minecraft-patches/features/0059-Faster-chunk-serialization.patch @@ -148,20 +148,20 @@ index a251ba67644cd02a0b00d7c8b0e2c64aa5e26291..59d48e7dc0911557c57a7e07f5f9013c - } else { - optional = Optional.empty(); + // The palette that will be serialized -+ net.caffeinemc.mods.lithium.common.world.chunk.LithiumHashPalette hashPalette = null; ++ org.leavesmc.leaves.lithium.common.world.chunk.LithiumHashPalette hashPalette = null; + + final Palette palette = this.data.palette(); + final BitStorage storage = this.data.storage(); + if (storage instanceof ZeroBitStorage || palette.getSize() == 1) { + // If the palette only contains one entry, don't attempt to repack it. + elements = List.of(palette.valueFor(0)); -+ } else if (palette instanceof net.caffeinemc.mods.lithium.common.world.chunk.LithiumHashPalette lithiumHashPalette) { ++ } else if (palette instanceof org.leavesmc.leaves.lithium.common.world.chunk.LithiumHashPalette lithiumHashPalette) { + hashPalette = lithiumHashPalette; } - var12 = new PalettedContainerRO.PackedData<>(hashMapPalette.getEntries(), optional); + if (elements == null) { -+ net.caffeinemc.mods.lithium.common.world.chunk.LithiumHashPalette compactedPalette = new net.caffeinemc.mods.lithium.common.world.chunk.LithiumHashPalette<>(registry, storage.getBits(), this.dummyPaletteResize); ++ org.leavesmc.leaves.lithium.common.world.chunk.LithiumHashPalette compactedPalette = new org.leavesmc.leaves.lithium.common.world.chunk.LithiumHashPalette<>(registry, storage.getBits(), this.dummyPaletteResize); + short[] array = this.getOrCreate(strategy.size()); + + storage.compact(this.data.palette(), compactedPalette, array); diff --git a/leaves-server/minecraft-patches/features/0074-Replay-Mod-API.patch b/leaves-server/minecraft-patches/features/0074-Replay-Mod-API.patch index d00dd391..c93ae918 100644 --- a/leaves-server/minecraft-patches/features/0074-Replay-Mod-API.patch +++ b/leaves-server/minecraft-patches/features/0074-Replay-Mod-API.patch @@ -142,7 +142,7 @@ index 4a34e43d5471bb12ef2535a1a9246376310c56f1..d50d0874aa34578af3ff8a6bb7c889ba } // Leaves end - skip diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index e74ca7f4c98590941fe88935d9fea0917c7b5c50..968a6bbff3540d781c0925a0db96c0492283d1f2 100644 +index e74ca7f4c98590941fe88935d9fea0917c7b5c50..769010299668550ddca53deda5dfdcd679f5767c 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java @@ -130,6 +130,7 @@ public abstract class PlayerList { @@ -259,7 +259,7 @@ index e74ca7f4c98590941fe88935d9fea0917c7b5c50..968a6bbff3540d781c0925a0db96c049 + this.server.getCustomBossEvents().onPlayerConnect(player); + } + -+ worldserver1 = player.serverLevel(); ++ worldserver1 = player.level(); + java.util.Iterator iterator = player.getActiveEffects().iterator(); + while (iterator.hasNext()) { + MobEffectInstance mobeffect = iterator.next(); @@ -286,7 +286,7 @@ index e74ca7f4c98590941fe88935d9fea0917c7b5c50..968a6bbff3540d781c0925a0db96c049 + // Leaves start - replay mod api + public void removePhotographer(org.leavesmc.leaves.replay.ServerPhotographer entityplayer) { -+ ServerLevel worldserver = entityplayer.serverLevel(); ++ ServerLevel worldserver = entityplayer.level(); + + entityplayer.awardStat(Stats.LEAVE_GAME); +