Compare commits
83 Commits
1.21.4-1eb
...
1.21.4-63b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63b9925139 | ||
|
|
df37bffeec | ||
|
|
3cc086d1f4 | ||
|
|
0330b1a800 | ||
|
|
b0d6bd1d16 | ||
|
|
f9c924e060 | ||
|
|
63823f00e2 | ||
|
|
2993c02935 | ||
|
|
2e19f456c6 | ||
|
|
cd6e6237fd | ||
|
|
71afaeef10 | ||
|
|
9a48934969 | ||
|
|
94663e55d1 | ||
|
|
da0622aaf8 | ||
|
|
0bb93aba3e | ||
|
|
588900adbf | ||
|
|
9f4ffccfe7 | ||
|
|
d6e9602210 | ||
|
|
c4deb93977 | ||
|
|
c764d5330b | ||
|
|
29772be9fa | ||
|
|
b7971229f4 | ||
|
|
fbc64bd17c | ||
|
|
462f2d940d | ||
|
|
157b73620a | ||
|
|
bb107e7e4c | ||
|
|
7e41183c7f | ||
|
|
8668ac45f4 | ||
|
|
60a82d9766 | ||
|
|
8d222e6b02 | ||
|
|
94e5c047a3 | ||
|
|
55e50ffc54 | ||
|
|
b66229fdfb | ||
|
|
c4d910f38e | ||
|
|
f1a0c96c7f | ||
|
|
8cfa995a1c | ||
|
|
c542cc1d2d | ||
|
|
34df6067cf | ||
|
|
d61c5e92bf | ||
|
|
2f052a116f | ||
|
|
9902d94d10 | ||
|
|
4098be9279 | ||
|
|
27f7d44d3b | ||
|
|
c06ddc3b10 | ||
|
|
3a5f608a84 | ||
|
|
fa10f4cc52 | ||
|
|
04d414a04b | ||
|
|
3a8425d3e9 | ||
|
|
e171f5a4d6 | ||
|
|
f132d2e6c8 | ||
|
|
685d7c664d | ||
|
|
c65c52ae1f | ||
|
|
23628b6d77 | ||
|
|
5ef91f2a8e | ||
|
|
458fc481f1 | ||
|
|
0341ddcc54 | ||
|
|
16cc1038fe | ||
|
|
3508abe5d0 | ||
|
|
aebe5b01c1 | ||
|
|
36852b0ccf | ||
|
|
141ad69b1a | ||
|
|
936be4c3fd | ||
|
|
2aaa180a4e | ||
|
|
c4af5b30dc | ||
|
|
56990d8dc3 | ||
|
|
b1f19647e3 | ||
|
|
dcfdff1a0b | ||
|
|
7b76c3dbaf | ||
|
|
adbdf9c29c | ||
|
|
f51216d01d | ||
|
|
3ef35a1b4b | ||
|
|
c06b8444aa | ||
|
|
3e96017ed6 | ||
|
|
85e32d5d03 | ||
|
|
778c82ee0a | ||
|
|
14146549a8 | ||
|
|
064898cddf | ||
|
|
c829110cf3 | ||
|
|
08cc27a648 | ||
|
|
531d824a55 | ||
|
|
0f6e3ac870 | ||
|
|
3550274e82 | ||
|
|
e24d0fffdf |
@@ -5,19 +5,15 @@ Subject: [PATCH] Rebrand to Luminol
|
||||
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfo.java b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
index 652ff54e7c50412503725d628bfe72ed03059790..db5e2f10278c20286779362cfdfadb2f42c724e0 100644
|
||||
index 652ff54e7c50412503725d628bfe72ed03059790..ee163b9fa8f441aa4b3e2309f33e8f932dfc02d7 100644
|
||||
--- a/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBuildInfo.java
|
||||
@@ -19,6 +19,17 @@ public interface ServerBuildInfo {
|
||||
@@ -19,6 +19,13 @@ public interface ServerBuildInfo {
|
||||
*/
|
||||
Key BRAND_PAPER_ID = Key.key("papermc", "paper");
|
||||
|
||||
+ // Luminol start
|
||||
+ /**
|
||||
+ * The brand id for folia
|
||||
+ */
|
||||
+ Key BRAND_FOLIA_ID = Key.key("papermc", "folia");
|
||||
+ /**
|
||||
+ * The brand id for Luminol.
|
||||
+ */
|
||||
+ Key BRAND_LUMINOL_ID = Key.key("luminolmc", "luminol");
|
||||
|
||||
@@ -37,10 +37,10 @@ index 0000000000000000000000000000000000000000..96147cace1550d14c682258dab039758
|
||||
+}
|
||||
diff --git a/src/main/java/me/earthme/luminol/api/ThreadedRegion.java b/src/main/java/me/earthme/luminol/api/ThreadedRegion.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..01dac0602b5f66f80c0adfbb779666fe0325a24f
|
||||
index 0000000000000000000000000000000000000000..38972ac3d05ccbbb134f751a8d018b9c53ad10b5
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/api/ThreadedRegion.java
|
||||
@@ -0,0 +1,56 @@
|
||||
@@ -0,0 +1,50 @@
|
||||
+package me.earthme.luminol.api;
|
||||
+
|
||||
+import org.bukkit.Location;
|
||||
@@ -90,12 +90,6 @@ index 0000000000000000000000000000000000000000..01dac0602b5f66f80c0adfbb779666fe
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ World getWorld();
|
||||
+
|
||||
+ /**
|
||||
+ * Get the id of the tick region</br>
|
||||
+ * @return The id of the tick region
|
||||
+ */
|
||||
+ long getId();
|
||||
+}
|
||||
diff --git a/src/main/java/me/earthme/luminol/api/ThreadedRegionizer.java b/src/main/java/me/earthme/luminol/api/ThreadedRegionizer.java
|
||||
new file mode 100644
|
||||
|
||||
@@ -3,10 +3,6 @@ From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Sun, 6 Apr 2025 10:42:47 +0800
|
||||
Subject: [PATCH] Leaves Fix SculkCatalyst exp skip
|
||||
|
||||
Co-authored by: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/master/leaves-api/paper-patches/features/0008-Fix-SculkCatalyst-exp-skip.patch)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java
|
||||
index ab7584873e46020148bceecbd42a43055684e6a0..f33ab20313310a113d6c88e0fc1fe1666218061e 100644
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
|
||||
Date: Mon, 24 Feb 2025 06:00:00 -0800
|
||||
Subject: [PATCH] Add config for tripwire dupe
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/TripWireHookBlock.java b/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
index 9aace993c6c18f1a50610e4766225485984b8167..07ffe289b9556b45a9ef7db5357d85b14fe23feb 100644
|
||||
--- a/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
+++ b/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
@@ -215,7 +215,7 @@ public class TripWireHookBlock extends Block {
|
||||
BlockState blockState2 = blockStates[i2];
|
||||
if (blockState2 != null) {
|
||||
BlockState blockState3 = level.getBlockState(blockPos1);
|
||||
- if (blockState3.is(Blocks.TRIPWIRE) || blockState3.is(Blocks.TRIPWIRE_HOOK)) {
|
||||
+ if (me.earthme.luminol.config.modules.misc.AllowTripwireDupe.enabled || blockState3.is(Blocks.TRIPWIRE) || blockState3.is(Blocks.TRIPWIRE_HOOK)) {
|
||||
if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !blockState3.is(Blocks.TRIPWIRE)) level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, Boolean.valueOf(flag2)), 3); // Paper - prevent tripwire from updating
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Sun, 18 May 2025 03:48:53 +0800
|
||||
Subject: [PATCH] Add config to modify tripwire behavior
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/TripWireHookBlock.java b/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
index 9aace993c6c18f1a50610e4766225485984b8167..419c1c7e14691a472b70ed548ecb928cb289b939 100644
|
||||
--- a/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
+++ b/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
@@ -214,10 +214,18 @@ public class TripWireHookBlock extends Block {
|
||||
BlockPos blockPos1 = pos.relative(direction, i2);
|
||||
BlockState blockState2 = blockStates[i2];
|
||||
if (blockState2 != null) {
|
||||
- BlockState blockState3 = level.getBlockState(blockPos1);
|
||||
- if (blockState3.is(Blocks.TRIPWIRE) || blockState3.is(Blocks.TRIPWIRE_HOOK)) {
|
||||
- if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !blockState3.is(Blocks.TRIPWIRE)) level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, Boolean.valueOf(flag2)), 3); // Paper - prevent tripwire from updating
|
||||
+ // Luminol start - tripwire and tripwireHook dupe
|
||||
+ if (me.earthme.luminol.config.modules.misc.AllowTripwireDupe.enabled) {
|
||||
+ level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, flag2), 3);
|
||||
+ level.getBlockState(blockPos1);
|
||||
+ } else {
|
||||
+ BlockState blockState3 = level.getBlockState(blockPos1);
|
||||
+ if (blockState3.is(Blocks.TRIPWIRE) || blockState3.is(Blocks.TRIPWIRE_HOOK)) {
|
||||
+ if (!io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates || !blockState3.is(Blocks.TRIPWIRE))
|
||||
+ level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, Boolean.valueOf(flag2)), 3); // Paper - prevent tripwire from updating
|
||||
+ }
|
||||
}
|
||||
+ // Luminol end - tripwire and tripwireHook dupe
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java b/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
|
||||
index f96fc1391167dea48cac1caa464b9026657df89a..eb869e574cee0d206684d5585c664a5f1d01ab65 100644
|
||||
--- a/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
|
||||
+++ b/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
|
||||
@@ -27,15 +27,43 @@ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> {
|
||||
// CraftBukkit end
|
||||
BlockPos.MutableBlockPos mutableBlockPos = pos.mutable();
|
||||
|
||||
+ // Luminol start - tripwire behavior modifier
|
||||
+ java.util.List<BlockPos> blockList1 = new java.util.ArrayList<>();
|
||||
+ java.util.List<BlockPos> blockList2 = new java.util.ArrayList<>();
|
||||
+ boolean flag21 = !java.util.Objects.equals(me.earthme.luminol.config.modules.misc.AllowTripwireDupe.behaviorMode, "VANILLA20")
|
||||
+ && !java.util.Objects.equals(me.earthme.luminol.config.modules.misc.AllowTripwireDupe.behaviorMode, "MIXED");
|
||||
for (int i = -2; i <= 2; i++) {
|
||||
for (int i1 = -2; i1 <= 2; i1++) {
|
||||
for (int i2 = -1; i2 < 3; i2++) {
|
||||
BlockPos blockPos = mutableBlockPos.set(pos).move(i1, i2, i);
|
||||
Block block = i2 == -1 ? Blocks.OBSIDIAN : Blocks.AIR;
|
||||
- // CraftBukkit start
|
||||
if (!blockList.getBlockState(blockPos).is(block)) {
|
||||
if (dropBlocks) {
|
||||
- blockList.destroyBlock(blockPos, true, null);
|
||||
+ boolean flag = false;
|
||||
+ if (me.earthme.luminol.config.modules.misc.AllowTripwireDupe.enabled) {
|
||||
+ switch (me.earthme.luminol.config.modules.misc.AllowTripwireDupe.behaviorMode) {
|
||||
+ case "VANILLA20": {
|
||||
+ flag = true;
|
||||
+ }
|
||||
+ case "MIXED": {
|
||||
+ net.minecraft.world.level.block.state.BlockState state = level.getBlockState(blockPos);
|
||||
+ if (state.is(Blocks.TRIPWIRE)) {
|
||||
+ if (state.getValue(net.minecraft.world.level.block.TripWireBlock.DISARMED)) {
|
||||
+ flag = true;
|
||||
+ blockList2.add(blockPos.immutable());
|
||||
+ }
|
||||
+ if (!flag) {
|
||||
+ flag = checkString(blockList2, blockPos);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ default: {
|
||||
+
|
||||
+ } // Luminol - 1.21 Logic - default empty
|
||||
+ }
|
||||
+ }
|
||||
+ if (flag) blockList1.add(blockPos.immutable());
|
||||
+ else blockList.destroyBlock(blockPos, true, null);
|
||||
}
|
||||
|
||||
blockList.setBlock(blockPos, block.defaultBlockState(), 3);
|
||||
@@ -54,11 +82,39 @@ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> {
|
||||
if (portalEvent.isCancelled()) return;
|
||||
}
|
||||
|
||||
- // SPIGOT-7856: End platform not dropping items after replacing blocks
|
||||
- if (dropBlocks) {
|
||||
- blockList.getList().forEach((state) -> level.destroyBlock(state.getPosition(), true, null));
|
||||
+ if (flag21 && !me.earthme.luminol.config.modules.misc.AllowTripwireDupe.enabled) {
|
||||
+ // Luminol start - When updated replace it with newer code
|
||||
+ if (dropBlocks) {
|
||||
+ java.util.function.Consumer<? super org.bukkit.craftbukkit.block.CraftBlockState> beforeRun = state -> level.destroyBlock(state.getPosition(), !blockList1.contains(state.getPosition()), null);
|
||||
+ java.util.function.Predicate<? super org.bukkit.block.BlockState> filter = $ -> true;
|
||||
+ for (org.bukkit.craftbukkit.block.CraftBlockState state : blockList.getList()) {
|
||||
+ if (filter.test(state)) {
|
||||
+ beforeRun.accept(state);
|
||||
+ if (state.isPlaced()) {
|
||||
+ state.getWorldHandle().setBlock(state.getPosition(), state.getHandle(), state.getFlag());
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ blockList.updateList();
|
||||
+ }
|
||||
+ // Luminol end - When updated replace it with newer code
|
||||
+ } else {
|
||||
+ // SPIGOT-7856: End platform not dropping items after replacing blocks
|
||||
+ if (dropBlocks) {
|
||||
+ blockList.getList().forEach((state) -> level.destroyBlock(state.getPosition(), !blockList1.contains(state.getPosition()), null)); // Luminol - prevent tripwire dupe in end platform generate
|
||||
+ }
|
||||
+ blockList.updateList();
|
||||
}
|
||||
- blockList.updateList();
|
||||
// CraftBukkit end
|
||||
}
|
||||
+
|
||||
+ private static boolean checkString(java.util.List<BlockPos> blockList, BlockPos blockPos) {
|
||||
+ for (BlockPos pos : blockList) {
|
||||
+ if (pos.getY() != blockPos.getY()) continue;
|
||||
+ if (pos.getX() == blockPos.getX() || pos.getZ() == blockPos.getZ()) return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Luminol end - tripwire behavior modifier
|
||||
}
|
||||
@@ -5,34 +5,10 @@ Subject: [PATCH] Tick regions api
|
||||
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/ThreadedRegionizer.java b/io/papermc/paper/threadedregions/ThreadedRegionizer.java
|
||||
index 604385af903845d966382ad0a4168798e4ed4a0e..45aa5484b1cdb317ed55f1b001dbfe13a720b2a7 100644
|
||||
index 604385af903845d966382ad0a4168798e4ed4a0e..7ac803ba9706b65a0125b6e00983fe6a7947991a 100644
|
||||
--- a/io/papermc/paper/threadedregions/ThreadedRegionizer.java
|
||||
+++ b/io/papermc/paper/threadedregions/ThreadedRegionizer.java
|
||||
@@ -43,6 +43,7 @@ public final class ThreadedRegionizer<R extends ThreadedRegionizer.ThreadedRegio
|
||||
private final RegionCallbacks<R, S> callbacks;
|
||||
private final StampedLock regionLock = new StampedLock();
|
||||
private Thread writeLockOwner;
|
||||
+ public final me.earthme.luminol.api.ThreadedRegionizer threadedRegionizerAPI; // Luminol - Tick region API
|
||||
|
||||
/*
|
||||
static final record Operation(String type, int chunkX, int chunkZ) {}
|
||||
@@ -72,6 +73,7 @@ public final class ThreadedRegionizer<R extends ThreadedRegionizer.ThreadedRegio
|
||||
this.world = world;
|
||||
this.callbacks = callbacks;
|
||||
//this.loadTestData();
|
||||
+ this.threadedRegionizerAPI = new me.earthme.luminol.api.impl.ThreadedRegionizerImpl(this.world); // Luminol - Tick region API
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -693,6 +695,7 @@ public final class ThreadedRegionizer<R extends ThreadedRegionizer.ThreadedRegio
|
||||
|
||||
private final ReferenceOpenHashSet<ThreadedRegion<R, S>> mergeIntoLater = new ReferenceOpenHashSet<>();
|
||||
private final ReferenceOpenHashSet<ThreadedRegion<R, S>> expectingMergeFrom = new ReferenceOpenHashSet<>();
|
||||
+ public final me.earthme.luminol.api.ThreadedRegion threadedRegionAPI = new me.earthme.luminol.api.impl.ThreadedRegionImpl((ThreadedRegion<TickRegions.TickRegionData, TickRegions.TickRegionSectionData>) this); // Luminol - Tickregion API
|
||||
|
||||
public ThreadedRegion(final ThreadedRegionizer<R, S> regioniser) {
|
||||
this.regioniser = regioniser;
|
||||
@@ -819,7 +822,7 @@ public final class ThreadedRegionizer<R extends ThreadedRegionizer.ThreadedRegio
|
||||
@@ -819,7 +819,7 @@ public final class ThreadedRegionizer<R extends ThreadedRegionizer.ThreadedRegio
|
||||
return this.deadSections.size() == this.sectionByKey.size();
|
||||
}
|
||||
|
||||
@@ -41,23 +17,3 @@ index 604385af903845d966382ad0a4168798e4ed4a0e..45aa5484b1cdb317ed55f1b001dbfe13
|
||||
return (double)this.deadSections.size() / (double)this.sectionByKey.size();
|
||||
}
|
||||
|
||||
diff --git a/io/papermc/paper/threadedregions/TickRegions.java b/io/papermc/paper/threadedregions/TickRegions.java
|
||||
index 988fe74578065c9464f5639e5cc6af79619edef5..bfb39cbf1ba58d02da7e35300eb95872747506e8 100644
|
||||
--- a/io/papermc/paper/threadedregions/TickRegions.java
|
||||
+++ b/io/papermc/paper/threadedregions/TickRegions.java
|
||||
@@ -134,6 +134,7 @@ public final class TickRegions implements ThreadedRegionizer.RegionCallbacks<Tic
|
||||
private final AtomicInteger entityCount = new AtomicInteger();
|
||||
private final AtomicInteger playerCount = new AtomicInteger();
|
||||
private final AtomicInteger chunkCount = new AtomicInteger();
|
||||
+ public final me.earthme.luminol.api.RegionStats regionStatsAPI = new me.earthme.luminol.api.impl.RegionStatsImpl(this); // Luminol - Tickregion API
|
||||
|
||||
public int getEntityCount() {
|
||||
return this.entityCount.get();
|
||||
@@ -183,6 +184,7 @@ public final class TickRegions implements ThreadedRegionizer.RegionCallbacks<Tic
|
||||
private final RegionStats regionStats;
|
||||
|
||||
public volatile ca.spottedleaf.leafprofiler.RegionizedProfiler.Handle profiler; // Folia - profiler
|
||||
+ public final me.earthme.luminol.api.TickRegionData tickRegionDataAPI = new me.earthme.luminol.api.impl.TickRegionDataImpl(this); // Luminol - Tickregion API
|
||||
|
||||
private TickRegionData(final ThreadedRegionizer.ThreadedRegion<TickRegionData, TickRegionSectionData> region) {
|
||||
this.region = region;
|
||||
|
||||
@@ -3,9 +3,6 @@ From: MrHua269 <wangxyper@163.com>
|
||||
Date: Tue, 28 Jan 2025 18:56:53 +0800
|
||||
Subject: [PATCH] Leaf Secure seed and matter seed command
|
||||
|
||||
Co-authored by: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
|
||||
As part of: Leaf (https://github.com/Winds-Studio/Leaf/blob/ver/1.21.4/leaf-server/minecraft-patches/features/0049-Matter-Secure-Seed.patch and https://github.com/Winds-Studio/Leaf/blob/ver/1.21.4/leaf-server/minecraft-patches/features/0050-Matter-Secure-Seed-command.patch)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/commands/SeedCommand.java b/net/minecraft/server/commands/SeedCommand.java
|
||||
index a65affc41a4fc299bc2281f0f53f2e075633899d..f071e469468b768bd9c063d78c222b1b3e3b13bd 100644
|
||||
|
||||
@@ -4,9 +4,6 @@ Date: Sat, 8 Mar 2025 21:14:53 +0800
|
||||
Subject: [PATCH] Leaf Remove useless creating stats json bases on player name
|
||||
logic
|
||||
|
||||
Co-authored by: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
||||
As part of: Leaf (https://github.com/Winds-Studio/Leaf/blob/ver/1.21.4/leaf-server/minecraft-patches/features/0043-Remove-useless-creating-stats-json-bases-on-player-n.patch)
|
||||
Licensed under: MIT
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index e5e946462da9e56344428139768075b7bd228ec0..9777a5b7ba9916e426ba87d6ee7cd56f0e43c195 100644
|
||||
|
||||
@@ -3,12 +3,9 @@ From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Sat, 8 Mar 2025 21:20:11 +0800
|
||||
Subject: [PATCH] Leaf Replace brain maps with optimized collection
|
||||
|
||||
Co-authored by: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com>
|
||||
As part of: Leaf (https://github.com/Winds-Studio/Leaf/blob/ver/1.21.4/leaf-server/minecraft-patches/features/0070-Replace-brain-maps-with-optimized-collection.patch)
|
||||
Licensed under: MIT
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/Brain.java b/net/minecraft/world/entity/ai/Brain.java
|
||||
index 52b08be8b37117edc38dddf6d1919178b1f86271..d98eae5ee8a69a89e37751594dfff636831c8016 100644
|
||||
index d61fba01feecce3610cd390f490d3097c5db19c4..67b71145e4feb4835a79a6007b04511a2c3b938a 100644
|
||||
--- a/net/minecraft/world/entity/ai/Brain.java
|
||||
+++ b/net/minecraft/world/entity/ai/Brain.java
|
||||
@@ -45,14 +45,14 @@ public class Brain<E extends LivingEntity> {
|
||||
|
||||
@@ -3,9 +3,6 @@ From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Sat, 8 Mar 2025 21:21:11 +0800
|
||||
Subject: [PATCH] Leaf Paper PR: Prevent zombie reinforcements loading chunks
|
||||
|
||||
Co-authored by: Newwind <support@newwindserver.com>
|
||||
As part of: Leaf (https://github.com/Winds-Studio/Leaf/blob/ver/1.21.4/leaf-server/minecraft-patches/features/0081-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch)
|
||||
Original license: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java
|
||||
index cf231380febd6d316eb902d43c636135ee0d7fa4..731473610e068a613d67efaee08ded810fe86cf0 100644
|
||||
|
||||
@@ -3,9 +3,6 @@ From: adabugra <57899270+adabugra@users.noreply.github.com>
|
||||
Date: Fri, 31 Jan 2025 19:17:01 +0300
|
||||
Subject: [PATCH] Leaves Disable moved wrongly threshold
|
||||
|
||||
Co-authored by: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/master/patches/removed/server/0099-Disable-moved-wrongly-threshold.patch)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a107d9ee24d0e39ce3e3e09bf27af1ea4ae35b96..225045400f152a9a8f030d6fe367764b00d99b24 100644
|
||||
|
||||
@@ -3,9 +3,6 @@ From: MrHua269 <wangxyper@163.com>
|
||||
Date: Sat, 8 Feb 2025 14:25:16 +0800
|
||||
Subject: [PATCH] Leaves Fix Incorrect Collision Behavior for Block Shape
|
||||
|
||||
Co-authored by: Fortern <blueten.ki@gmail.com>
|
||||
As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/master/leaves-server/minecraft-patches/features/0110-Fix-Incorrect-Collision-Behavior-for-Block-Shape.patch)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java b/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java
|
||||
index 471b6d49d77e03665ffc269d17ab46f225e3ce1c..c574f9a23868a35ef694e432ba581d2f00e39da7 100644
|
||||
|
||||
@@ -3,9 +3,6 @@ From: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
Date: Sun, 6 Apr 2025 10:42:45 +0800
|
||||
Subject: [PATCH] Leaves Fix SculkCatalyst exp skip
|
||||
|
||||
Co-authored by: violetc <58360096+s-yh-china@users.noreply.github.com>
|
||||
As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/master/leaves-server/paper-patches/features/0016-Fix-SculkCatalyst-exp-skip.patch)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java
|
||||
index ca67950e35c7f420846337e885d95b8eabca3f37..d9ea3db817878ff56a2772ce983ff95431e1326c 100644
|
||||
|
||||
@@ -63,7 +63,7 @@ index 29bd788ae8bc61c1e62a4f84b9e259931a7041ce..1676ac5e6c8369836bf719f338603fbb
|
||||
} else {
|
||||
final Optional<String> gitBranch = build.gitBranch();
|
||||
diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||
index e741201fdbea0dbbc0e42313ebd33368014c9dc4..e3c5f4c31f084294a59830f3e764921433dd80d5 100644
|
||||
index e741201fdbea0dbbc0e42313ebd33368014c9dc4..673a81734a0903a0790f3007772642d3d9a044cc 100644
|
||||
--- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||
+++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java
|
||||
@@ -31,6 +31,7 @@ public record ServerBuildInfoImpl(
|
||||
@@ -91,7 +91,7 @@ index e741201fdbea0dbbc0e42313ebd33368014c9dc4..e3c5f4c31f084294a59830f3e7649214
|
||||
@Override
|
||||
public boolean isBrandCompatible(final @NotNull Key brandId) {
|
||||
- return brandId.equals(this.brandId);
|
||||
+ return brandId.equals(this.brandId) || brandId.equals(BRAND_PAPER_ID) || brandId.equals(BRAND_FOLIA_ID); // Luminol
|
||||
+ return brandId.equals(this.brandId) || brandId.equals(BRAND_PAPER_ID); // Luminol
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Tick regions api
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index cd6e46fa68c009deb8dfebcecb88e058dfede0b0..f0c8e76efaf897a81283edbf9a9c2a71bc28c9a9 100644
|
||||
index cd6e46fa68c009deb8dfebcecb88e058dfede0b0..ac4ab407095d998b1418d740ab54e8157bce6a02 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -2517,4 +2517,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -16,7 +16,7 @@ index cd6e46fa68c009deb8dfebcecb88e058dfede0b0..f0c8e76efaf897a81283edbf9a9c2a71
|
||||
+ // Luminol start - Tick regions api
|
||||
+ @Override
|
||||
+ public me.earthme.luminol.api.ThreadedRegionizer getThreadedRegionizer() {
|
||||
+ return this.world.regioniser.threadedRegionizerAPI;
|
||||
+ return new me.earthme.luminol.api.impl.ThreadedRegionizerImpl(this.world);
|
||||
+ }
|
||||
+ // Luminol end
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/api/impl/ThreadedRegionImpl.java
|
||||
@@ -1,0 +_,52 @@
|
||||
@@ -1,0 +_,47 @@
|
||||
+package me.earthme.luminol.api.impl;
|
||||
+
|
||||
+import io.papermc.paper.threadedregions.ThreadedRegionizer;
|
||||
@@ -39,7 +39,7 @@
|
||||
+
|
||||
+ @Override
|
||||
+ public TickRegionData getTickRegionData() {
|
||||
+ return this.internal.getData().tickRegionDataAPI;
|
||||
+ return new TickRegionDataImpl(this.internal.getData());
|
||||
+ }
|
||||
+
|
||||
+ @Nullable
|
||||
@@ -47,9 +47,4 @@
|
||||
+ public World getWorld() {
|
||||
+ return this.internal.regioniser.world.getWorld();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public long getId() {
|
||||
+ return this.internal.id;
|
||||
+ }
|
||||
+}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ return got.threadedRegionAPI;
|
||||
+ return new ThreadedRegionImpl(got);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
@@ -51,6 +51,6 @@
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ return got.threadedRegionAPI;
|
||||
+ return new ThreadedRegionImpl(got);
|
||||
+ }
|
||||
+}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
+
|
||||
+ @Override
|
||||
+ public RegionStats getRegionStats() {
|
||||
+ return this.internal.getRegionStats().regionStatsAPI;
|
||||
+ return new RegionStatsImpl(this.internal.getRegionStats());
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/config/BasicTransferLogic.java
|
||||
@@ -1,0 +_,7 @@
|
||||
+package me.earthme.luminol.config;
|
||||
+
|
||||
+public class BasicTransferLogic {
|
||||
+ public Object transform(Object obj) {
|
||||
+ return obj;
|
||||
+ }
|
||||
+}
|
||||
@@ -1,9 +1,8 @@
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/config/LuminolConfig.java
|
||||
@@ -1,0 +_,268 @@
|
||||
@@ -1,0 +_,226 @@
|
||||
+package me.earthme.luminol.config;
|
||||
+
|
||||
+import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
||||
+import com.electronwill.nightconfig.core.file.CommentedFileConfig;
|
||||
+import io.papermc.paper.threadedregions.RegionizedServer;
|
||||
+import me.earthme.luminol.commands.LuminolConfigCommand;
|
||||
@@ -129,33 +128,6 @@
|
||||
+ final Object currentValue = field.get(null);
|
||||
+
|
||||
+ if (!configFileInstance.contains(fullConfigKeyName)){
|
||||
+ for (RemovedConfig removedConfig : field.getAnnotationsByType(RemovedConfig.class)) {
|
||||
+ final String oldConfigKeyName = String.join(".", removedConfig.category()) + "." + removedConfig.name();
|
||||
+ Object oldValue = configFileInstance.get(oldConfigKeyName);
|
||||
+ if (oldValue != null) {
|
||||
+ boolean success = true;
|
||||
+ if (removedConfig.transfer()) {
|
||||
+ try {
|
||||
+ Object oldValueTransferred = ((BasicTransferLogic)removedConfig.transferLogic().getDeclaredConstructor().newInstance()).transform(oldValue);
|
||||
+ configFileInstance.add(fullConfigKeyName, oldValueTransferred);
|
||||
+ } catch (Exception e) {
|
||||
+ success = false;
|
||||
+ logger.error("Failed to transfer removed config {}!", removedConfig.name());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (success) {
|
||||
+ removeConfig(oldConfigKeyName, removedConfig.category());
|
||||
+ }
|
||||
+ final String comments = configInfo.comments();
|
||||
+
|
||||
+ if (!comments.isBlank()){
|
||||
+ configFileInstance.setComment(fullConfigKeyName,comments);
|
||||
+ }
|
||||
+ if (configFileInstance.get(fullConfigKeyName) != null) break;
|
||||
+ }
|
||||
+ }
|
||||
+ if (configFileInstance.get(fullConfigKeyName) != null) continue;
|
||||
+ if (currentValue == null){
|
||||
+ throw new UnsupportedOperationException("Config " + singleConfigModule.getBaseName() + "tried to add an null default value!");
|
||||
+ }
|
||||
@@ -176,20 +148,6 @@
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public static void removeConfig(String name,String[] keys) {
|
||||
+ configFileInstance.remove(name);
|
||||
+ if (configFileInstance.get(String.join(".", keys)) instanceof UnmodifiableConfig) {
|
||||
+ removeConfig(keys);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public static void removeConfig(String[] keys) {
|
||||
+ configFileInstance.remove(String.join(".", keys));
|
||||
+ if (configFileInstance.get(String.join(".", Arrays.copyOfRange(keys, 1, keys.length))) instanceof UnmodifiableConfig) {
|
||||
+ removeConfig(Arrays.copyOfRange(keys, 1, keys.length));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public static @NotNull Set<Class<?>> getClasses(String pack) {
|
||||
+ Set<Class<?>> classes = new LinkedHashSet<>();
|
||||
+ String packageDirName = pack.replace('.', '/');
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/config/RemovedConfig.java
|
||||
@@ -1,0 +_,20 @@
|
||||
+package me.earthme.luminol.config;
|
||||
+
|
||||
+import java.lang.annotation.*;
|
||||
+
|
||||
+@Retention(RetentionPolicy.RUNTIME)
|
||||
+@Repeatable(RemovedConfig.List.class)
|
||||
+public @interface RemovedConfig {
|
||||
+ String name() default "";
|
||||
+
|
||||
+ String[] category() default "";
|
||||
+
|
||||
+ boolean transfer() default true;
|
||||
+
|
||||
+ Class<?> transferLogic() default BasicTransferLogic.class;
|
||||
+
|
||||
+ @Retention(RetentionPolicy.RUNTIME)
|
||||
+ @interface List {
|
||||
+ RemovedConfig[] value();
|
||||
+ }
|
||||
+}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/config/modules/misc/AllowTripwireDupe.java
|
||||
@@ -1,0 +_,27 @@
|
||||
@@ -1,0 +_,20 @@
|
||||
+package me.earthme.luminol.config.modules.misc;
|
||||
+
|
||||
+import me.earthme.luminol.config.ConfigInfo;
|
||||
@@ -10,13 +10,6 @@
|
||||
+public class AllowTripwireDupe implements IConfigModule {
|
||||
+ @ConfigInfo(baseName = "enabled")
|
||||
+ public static boolean enabled = false;
|
||||
+ @ConfigInfo(baseName = "behavior-mode", comments =
|
||||
+ """
|
||||
+ Allowed Value:
|
||||
+ VANILLA20
|
||||
+ VANILLA21
|
||||
+ MIXED""")
|
||||
+ public static String behaviorMode = "VANILLA21";
|
||||
+
|
||||
+ @Override
|
||||
+ public EnumConfigCategory getCategory() {
|
||||
|
||||
Reference in New Issue
Block a user