Compare commits
8 Commits
1.21.5-064
...
dev/1.21.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7899ce2a0 | ||
|
|
e963af5628 | ||
|
|
b74abd342b | ||
|
|
63507137a0 | ||
|
|
7b7fe5c62a | ||
|
|
0a00e23143 | ||
|
|
c935e6bdc8 | ||
|
|
31d22035f3 |
8
.github/workflows/build_1.21.5.yml
vendored
8
.github/workflows/build_1.21.5.yml
vendored
@@ -1,10 +1,10 @@
|
||||
name: Luminol CI - dev/1.21.5
|
||||
name: Luminol CI - ver/1.21.5
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "dev/1.21.5" ]
|
||||
branches: [ "ver/1.21.5" ]
|
||||
pull_request:
|
||||
branches: [ "dev/1.21.5" ]
|
||||
branches: [ "ver/1.21.5" ]
|
||||
|
||||
permissions: write-all
|
||||
|
||||
@@ -67,6 +67,6 @@ jobs:
|
||||
artifacts: |
|
||||
${{ env.jar_dir }}
|
||||
generateReleaseNotes: true
|
||||
prerelease: true
|
||||
prerelease: false
|
||||
makeLatest: ${{ env.make_latest }}
|
||||
token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
- `git`
|
||||
- `JDK 21 或更高版本`
|
||||
|
||||
特别提醒:在操作前,您需要启用系统和Git的长路径支持,以下为部分平台的相关描述。
|
||||
|
||||
[`Windows`](https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation)
|
||||
[`Git for Windows`](https://gitforwindows.org/faq.html#i-get-errors-trying-to-check-out-files-with-long-path-names)
|
||||
|
||||
## 了解补丁(Patches)
|
||||
|
||||
Luminol 使用和 Folia 一样的补丁系统,并为了针对不同部分的修改分成了两个目录:
|
||||
|
||||
@@ -25,6 +25,11 @@ Before coding, you need these pieces of software / tools as Dev Environment.
|
||||
- `git`
|
||||
- `JDK 21 or higher`
|
||||
|
||||
PS: You need to enable long path support in your System and Git before start, some of the platform's resolution here.
|
||||
|
||||
[`Windows`](https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation)
|
||||
[`Git for Windows`](https://gitforwindows.org/faq.html#i-get-errors-trying-to-check-out-files-with-long-path-names)
|
||||
|
||||
## Understanding "Patches"
|
||||
|
||||
Luminol uses as the same patching system as Paper,
|
||||
|
||||
@@ -5,7 +5,7 @@ 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 8a3a8b0fdf9545a41501dc992c6982d9c8ce7b66..8139387c1b0814c86d770f5ef6dda952140467ea 100644
|
||||
index 8a3a8b0fdf9545a41501dc992c6982d9c8ce7b66..8f9f5b0bf098a32a732e3ff9f636e3ea828e5f43 100644
|
||||
--- a/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
+++ b/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
@@ -200,10 +200,17 @@ public class TripWireHookBlock extends Block {
|
||||
@@ -16,7 +16,7 @@ index 8a3a8b0fdf9545a41501dc992c6982d9c8ce7b66..8139387c1b0814c86d770f5ef6dda952
|
||||
- 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, flag2), 3); // Paper - prevent tripwire from updating
|
||||
+ // Luminol start - tripwire and tripwireHook dupe
|
||||
+ if (me.earthme.luminol.config.modules.misc.AllowTripwireDupe.enabled) {
|
||||
+ if (me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.enabled) {
|
||||
+ level.setBlock(blockPos1, blockState2.trySetValue(ATTACHED, flag2), 3);
|
||||
+ level.getBlockState(blockPos1);
|
||||
+ } else {
|
||||
@@ -30,7 +30,7 @@ index 8a3a8b0fdf9545a41501dc992c6982d9c8ce7b66..8139387c1b0814c86d770f5ef6dda952
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java b/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
|
||||
index 49b810ae9d9a8d0718a5f8c512e15a5573ed04fd..ae48255ee384a7b4a44c8754601200d361665934 100644
|
||||
index 49b810ae9d9a8d0718a5f8c512e15a5573ed04fd..37ebb23c9c053de0530254d98f2120058833f232 100644
|
||||
--- a/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
|
||||
+++ b/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
|
||||
@@ -28,6 +28,11 @@ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> {
|
||||
@@ -40,8 +40,8 @@ index 49b810ae9d9a8d0718a5f8c512e15a5573ed04fd..ae48255ee384a7b4a44c8754601200d3
|
||||
+ // 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");
|
||||
+ boolean flag21 = !java.util.Objects.equals(me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.behaviorMode, "VANILLA20")
|
||||
+ && !java.util.Objects.equals(me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.behaviorMode, "MIXED");
|
||||
for (int i = -2; i <= 2; i++) {
|
||||
for (int i1 = -2; i1 <= 2; i1++) {
|
||||
for (int i2 = -1; i2 < 3; i2++) {
|
||||
@@ -51,8 +51,8 @@ index 49b810ae9d9a8d0718a5f8c512e15a5573ed04fd..ae48255ee384a7b4a44c8754601200d3
|
||||
if (dropBlocks) {
|
||||
- blockList.destroyBlock(blockPos, true, null); // CraftBukkit
|
||||
+ boolean flag = false;
|
||||
+ if (me.earthme.luminol.config.modules.misc.AllowTripwireDupe.enabled) {
|
||||
+ switch (me.earthme.luminol.config.modules.misc.AllowTripwireDupe.behaviorMode) {
|
||||
+ if (me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.enabled) {
|
||||
+ switch (me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.behaviorMode) {
|
||||
+ case "VANILLA20": {
|
||||
+ flag = true;
|
||||
+ }
|
||||
@@ -82,7 +82,7 @@ index 49b810ae9d9a8d0718a5f8c512e15a5573ed04fd..ae48255ee384a7b4a44c8754601200d3
|
||||
|
||||
- if (dropBlocks) {
|
||||
- blockList.placeBlocks(state -> level.destroyBlock(state.getPosition(), true, null));
|
||||
+ if (flag21 || !me.earthme.luminol.config.modules.misc.AllowTripwireDupe.enabled) {
|
||||
+ if (flag21 || !me.earthme.luminol.config.modules.misc.TripwireBehaviorConfig.enabled) {
|
||||
+ if (dropBlocks) {
|
||||
+ blockList.placeBlocks(state -> level.destroyBlock(state.getPosition(), true, null));
|
||||
+ } else {
|
||||
|
||||
@@ -3,9 +3,11 @@ From: MrHua269 <wangxyper@163.com>
|
||||
Date: Wed, 22 Jan 2025 17:23:16 +0800
|
||||
Subject: [PATCH] Gale: Optimize noise generation
|
||||
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>, ishland <ishlandmc@yeah.net>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0106-Optimize-noise-generation.patch) and C2ME (https://github.com/RelativityMC/C2ME-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>
|
||||
ishland <ishlandmc@yeah.net>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0106-Optimize-noise-generation.patch)
|
||||
C2ME (https://github.com/RelativityMC/C2ME-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java b/net/minecraft/world/level/levelgen/synth/ImprovedNoise.java
|
||||
index fb11a2eea540d55e50eab59f9857ca5d99f556f8..dcc1a3f8b611c9f103b848db90b077b984b60ada 100644
|
||||
|
||||
@@ -3,8 +3,10 @@ From: MrHua269 <wangxyper@163.com>
|
||||
Date: Wed, 22 Jan 2025 17:18:00 +0800
|
||||
Subject: [PATCH] Gale: Replace AI attributes with optimized collections
|
||||
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>, 2No2Name <2No2Name@web.de>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0087-Replace-AI-attributes-with-optimized-collections.patch) and Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>
|
||||
2No2Name <2No2Name@web.de>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0087-Replace-AI-attributes-with-optimized-collections.patch)
|
||||
Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/net/minecraft/world/entity/ai/attributes/AttributeMap.java
|
||||
|
||||
@@ -3,8 +3,10 @@ From: MrHua269 <wangxyper@163.com>
|
||||
Date: Sun, 12 Jan 2025 15:35:15 +0800
|
||||
Subject: [PATCH] Gale: Skip entity move if movement is zero
|
||||
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>, ishland <ishlandmc@yeah.net>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0103-Skip-entity-move-if-movement-is-zero.patch) and VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>
|
||||
ishland <ishlandmc@yeah.net>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0103-Skip-entity-move-if-movement-is-zero.patch)
|
||||
VMP (https://github.com/RelativityMC/VMP-fabric)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
|
||||
@@ -3,8 +3,10 @@ From: MrHua269 <wangxyper@163.com>
|
||||
Date: Sun, 12 Jan 2025 14:15:24 +0800
|
||||
Subject: [PATCH] Gale: Use platform math functions
|
||||
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>, Xymb <xymb@endcrystal.me>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0019-Use-platform-math-functions.patch) and Kaiiju(https://github.com/KaiijuMC/Kaiiju)
|
||||
Co-authored by: Martijn Muijsers <martijnmuijsers@live.nl>
|
||||
Xymb <xymb@endcrystal.me>
|
||||
As part of: Gale (https://github.com/GaleMC/Gale/blob/276e903b2688f23b19bdc8d493c0bf87656d2400/patches/server/0019-Use-platform-math-functions.patch)
|
||||
Kaiiju (https://github.com/KaiijuMC/Kaiiju)
|
||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||
|
||||
diff --git a/net/minecraft/util/Mth.java b/net/minecraft/util/Mth.java
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Sun, 9 Mar 2025 11:39:01 +0800
|
||||
Subject: [PATCH] Do not search the block out of current region
|
||||
|
||||
Skip getting the blocks don't belong to current tickregion.
|
||||
|
||||
notice: this bug is actually caused by another bug of the teleportAsync implementation.
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
index fc529ece01d8a85e600eb8910662010ab6851d82..7364515b7e489c5e97c7ca693458ff2ae9335c6e 100644
|
||||
--- a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
@@ -432,6 +432,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||
if (i != 0 || i1 != 0 || allowBedrock) {
|
||||
for (int y = level.getMaxY(); y > (blockPos == null ? level.getMinY() : blockPos.getY()); y--) {
|
||||
BlockPos blockPos1 = new BlockPos(pos.getX() + i, y, pos.getZ() + i1);
|
||||
+ if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor((Level) level, blockPos1)) continue; // Luminol - Do not search the block out of current region as we might be at the edge of the tickregion
|
||||
BlockState blockState = level.getBlockState(blockPos1);
|
||||
if (blockState.isCollisionShapeFullBlock(level, blockPos1) && (allowBedrock || !blockState.is(Blocks.BEDROCK))) {
|
||||
blockPos = blockPos1;
|
||||
@@ -7,10 +7,10 @@ We use the old-like logics which is in 1.21.4.
|
||||
Might fixes: https://github.com/PaperMC/Folia/issues/363
|
||||
|
||||
diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 6dc5b1a8bdba998e11bcdf352bcc0fc7161a484c..753b36a7b1c2627540c62bea78565b880803a175 100644
|
||||
index f8322334fb6a0cea38c4d1981862ba673fd1b100..0e08512ce94435ca90a2344eefc761fa4fcdeb18 100644
|
||||
--- a/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -173,10 +173,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -173,14 +173,26 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
// 2. _removes_ are impossible at this stage in the tick
|
||||
final LevelChunk[] raw = entityTickingChunks.getRawDataUnchecked();
|
||||
final int size = entityTickingChunks.size(); foliaProfiler.addCounter(ca.spottedleaf.leafprofiler.LProfilerRegistry.RANDOM_CHUNK_TICK_COUNT, (long)size); // Folia - profiler
|
||||
@@ -20,10 +20,23 @@ index 6dc5b1a8bdba998e11bcdf352bcc0fc7161a484c..753b36a7b1c2627540c62bea78565b88
|
||||
+ // Luminol end
|
||||
|
||||
- java.util.Objects.checkFromToIndex(0, size, raw.length);
|
||||
+ this.level.getServer().moonrise$executeMidTickTasks(); // Luminol - Fix chunk iteration self modification - try executing mid-tick tasks for once chunk system task parsing
|
||||
+ java.util.Objects.checkFromToIndex(0, size, rawCopy.length); // Luminol - Fix chunk iteration self modification - use copy of raw array
|
||||
for (int i = 0; i < size; ++i) {
|
||||
- world.tickChunk(raw[i], randomTickSpeed);
|
||||
+ world.tickChunk(rawCopy[i], randomTickSpeed); // Luminol - Fix chunk iteration self modification - use copy of raw array
|
||||
+ // Luminol start - Fix chunk iteration self modification
|
||||
+ final LevelChunk chunk = rawCopy[i];
|
||||
+
|
||||
+ if (!chunk.getFullStatus().isOrAfter(FullChunkStatus.ENTITY_TICKING)) {
|
||||
+ continue; // skip chunks which are not entity ticking(probably downgraded from last iteration)
|
||||
+ }
|
||||
+ // Luminol end
|
||||
+ world.tickChunk(chunk, randomTickSpeed); // Luminol - Fix chunk iteration self modification - use copy of raw array
|
||||
|
||||
// call mid-tick tasks for chunk system
|
||||
if ((i & 7) == 0) {
|
||||
- //((ca.spottedleaf.moonrise.patches.chunk_system.server.ChunkSystemMinecraftServer)this.level.getServer()).moonrise$executeMidTickTasks(); // Folia - TODO restore this
|
||||
+ ((ca.spottedleaf.moonrise.patches.chunk_system.server.ChunkSystemMinecraftServer)this.level.getServer()).moonrise$executeMidTickTasks(); // Folia - TODO restore this // Luminol - Fix chunk iteration self modification - restore mid tasks here
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Sat, 31 May 2025 16:28:19 +0800
|
||||
Subject: [PATCH] Fix mispatched entity custom spawning logic
|
||||
|
||||
we should use local players as each tickregion will only foreach their own player entities so that we won't come across async accessing world data
|
||||
|
||||
diff --git a/net/minecraft/world/entity/npc/CatSpawner.java b/net/minecraft/world/entity/npc/CatSpawner.java
|
||||
index f5d27988605d48cdf314f28ba332f33f0a314266..39b506dad0601b2d75acb14989f2758132155d1b 100644
|
||||
--- a/net/minecraft/world/entity/npc/CatSpawner.java
|
||||
+++ b/net/minecraft/world/entity/npc/CatSpawner.java
|
||||
@@ -27,7 +27,7 @@ public class CatSpawner implements CustomSpawner {
|
||||
worldData.catSpawnerNextTick--; // Folia - region threading
|
||||
if (worldData.catSpawnerNextTick <= 0) { // Folia - region threading
|
||||
worldData.catSpawnerNextTick = 1200; // Folia - region threading
|
||||
- Player randomPlayer = level.getRandomPlayer();
|
||||
+ Player randomPlayer = level.getRandomLocalPlayer(); // Luminol - Fix mispatched entity custom spawning logic - Use local players for only the players in current tickregion
|
||||
if (randomPlayer != null) {
|
||||
RandomSource randomSource = level.random;
|
||||
int i = (8 + randomSource.nextInt(24)) * (randomSource.nextBoolean() ? -1 : 1);
|
||||
diff --git a/net/minecraft/world/level/levelgen/PhantomSpawner.java b/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
index a7f56126a26e1fca86c39d8d656b648f5d6bb4ca..4626ee9f4410d8fd683db17b49ef79ab67eeda5f 100644
|
||||
--- a/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
+++ b/net/minecraft/world/level/levelgen/PhantomSpawner.java
|
||||
@@ -40,7 +40,7 @@ public class PhantomSpawner implements CustomSpawner {
|
||||
worldData.phantomSpawnerNextTick += (spawnAttemptMinSeconds + randomSource.nextInt(spawnAttemptMaxSeconds - spawnAttemptMinSeconds + 1)) * 20; // Folia - region threading
|
||||
// Paper end - Ability to control player's insomnia and phantoms
|
||||
if (level.getSkyDarken() >= 5 || !level.dimensionType().hasSkyLight()) {
|
||||
- for (ServerPlayer serverPlayer : level.players()) {
|
||||
+ for (ServerPlayer serverPlayer : level.getLocalPlayers()) { // Luminol - Fix mispatched entity custom spawning logic - Use local players for only the players in current tickregion
|
||||
if (!serverPlayer.isSpectator() && (!level.paperConfig().entities.behavior.phantomsDoNotSpawnOnCreativePlayers || !serverPlayer.isCreative())) { // Paper - Add phantom creative and insomniac controls
|
||||
BlockPos blockPos = serverPlayer.blockPosition();
|
||||
if (!level.dimensionType().hasSkyLight() || blockPos.getY() >= level.getSeaLevel() && level.canSeeSky(blockPos)) {
|
||||
@@ -0,0 +1,33 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MrHua269 <mrhua269@gmail.com>
|
||||
Date: Thu, 5 Jun 2025 21:11:31 +0800
|
||||
Subject: [PATCH] Fix off region thrown egg new entity creating
|
||||
|
||||
should set pos before so that we could correctly modify the entity's other attribute on-region without triggering the async catchers
|
||||
|
||||
diff --git a/net/minecraft/world/entity/projectile/ThrownEgg.java b/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
index 73ec34b43f3fb2aa3edc3f1cb48a923d1fa32036..5d2f80c4dd8cb6726b0f42891d4ddbc85bf153a7 100644
|
||||
--- a/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
+++ b/net/minecraft/world/entity/projectile/ThrownEgg.java
|
||||
@@ -97,17 +97,18 @@ public class ThrownEgg extends ThrowableItemProjectile {
|
||||
for (int i1 = 0; i1 < i; i1++) {
|
||||
net.minecraft.world.entity.Entity chicken = newEntityType.create(this.level(), net.minecraft.world.entity.EntitySpawnReason.TRIGGERED); // CraftBukkit
|
||||
if (chicken != null) {
|
||||
+ chicken.snapTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F); // Luminol - Fix off region thrown egg - move up
|
||||
// CraftBukkit start
|
||||
if (chicken.getBukkitEntity() instanceof org.bukkit.entity.Ageable ageable) {
|
||||
ageable.setBaby();
|
||||
}
|
||||
// CraftBukkit end
|
||||
- chicken.snapTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F);
|
||||
+ // chicken.snapTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F); // Luminol - Fix off region thrown egg - move up
|
||||
// CraftBukkit start
|
||||
if (chicken instanceof Chicken realChicken) {
|
||||
Optional.ofNullable(this.getItem().get(DataComponents.CHICKEN_VARIANT))
|
||||
- .flatMap(eitherHolder -> eitherHolder.unwrap(this.registryAccess()))
|
||||
- .ifPresent(realChicken::setVariant);
|
||||
+ .flatMap(eitherHolder -> eitherHolder.unwrap(this.registryAccess()))
|
||||
+ .ifPresent(realChicken::setVariant);
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (!chicken.fudgePositionAfterSizeChange(ZERO_SIZED_DIMENSIONS)) {
|
||||
@@ -10,9 +10,9 @@
|
||||
+@Retention(RetentionPolicy.RUNTIME)
|
||||
+@Repeatable(TransformedConfig.List.class)
|
||||
+public @interface TransformedConfig {
|
||||
+ String name() default "";
|
||||
+ String name();
|
||||
+
|
||||
+ String[] category() default "";
|
||||
+ String[] category();
|
||||
+
|
||||
+ boolean transform() default true;
|
||||
+
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/config/modules/experiment/EntityDamageSourceTraceConfig.java
|
||||
@@ -1,0 +_,22 @@
|
||||
@@ -1,0 +_,24 @@
|
||||
+package me.earthme.luminol.config.modules.experiment;
|
||||
+
|
||||
+import me.earthme.luminol.config.ConfigInfo;
|
||||
+import me.earthme.luminol.config.EnumConfigCategory;
|
||||
+import me.earthme.luminol.config.IConfigModule;
|
||||
+import me.earthme.luminol.config.TransformedConfig;
|
||||
+
|
||||
+public class EntityDamageSourceTraceConfig implements IConfigModule {
|
||||
+ @TransformedConfig(name = "enabled", category = {"experiment", "entity-damage-source-trace"})
|
||||
+ @ConfigInfo(baseName = "enabled", comments =
|
||||
+ """
|
||||
+ Allow trace damage source cross different Region Scheduler.""")
|
||||
|
||||
@@ -1,31 +1,36 @@
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/config/modules/misc/RaidChangesConfig.java
|
||||
@@ -1,0 +_,54 @@
|
||||
@@ -1,0 +_,61 @@
|
||||
+package me.earthme.luminol.config.modules.misc;
|
||||
+
|
||||
+import me.earthme.luminol.config.ConfigInfo;
|
||||
+import me.earthme.luminol.config.EnumConfigCategory;
|
||||
+import me.earthme.luminol.config.IConfigModule;
|
||||
+import me.earthme.luminol.config.TransformedConfig;
|
||||
+
|
||||
+public class RaidChangesConfig implements IConfigModule {
|
||||
+ @TransformedConfig(name = "allow-bad-omen-trigger-raid", category = {"misc", "revert-raid-changes"})
|
||||
+ @ConfigInfo(baseName = "allow_bad_omen_trigger_raid", comments =
|
||||
+ """
|
||||
+ Allow players with ominous signs to skip a\s
|
||||
+ 30-second cooldown and trigger attacks directly""")
|
||||
+ public static boolean trigger = false;
|
||||
+
|
||||
+ @TransformedConfig(name = "give-bad-omen-when-kill-patrol-leader", category = {"misc", "revert-raid-changes"})
|
||||
+ @ConfigInfo(baseName = "give_bad_omen_when_kill_patrol_leader", comments =
|
||||
+ """
|
||||
+ Enable players to obtain an ominous omen\s
|
||||
+ effect when killing the patrol team captain""")
|
||||
+ public static boolean effect = false;
|
||||
+
|
||||
+ @TransformedConfig(name = "bad-omen-infinite", category = {"misc", "revert-raid-changes"})
|
||||
+ @ConfigInfo(baseName = "bad_omen_infinite", comments =
|
||||
+ """
|
||||
+ Enable bad omen effect infinite time
|
||||
+ --- this config is not old version's function""")
|
||||
+ public static boolean infinite = false;
|
||||
+
|
||||
+ @TransformedConfig(name = "skip-height-check", category = {"misc", "revert-raid-changes"})
|
||||
+ @ConfigInfo(baseName = "skip_height_check", comments =
|
||||
+ """
|
||||
+ Disable y <= 96 check.
|
||||
@@ -33,12 +38,14 @@
|
||||
+ and always behavior of enabled""")
|
||||
+ public static boolean heightCheck = false;
|
||||
+
|
||||
+ @TransformedConfig(name = "skip-self-raid-check", category = {"misc", "revert-raid-changes"})
|
||||
+ @ConfigInfo(baseName = "skip_self_raid_check", comments =
|
||||
+ """
|
||||
+ Disable raid self check\s
|
||||
+ --- this config is not old version's function""")
|
||||
+ public static boolean selfCheck = false;
|
||||
+
|
||||
+ @TransformedConfig(name = "revert-274911", category = {"misc", "revert-raid-changes"})
|
||||
+ @ConfigInfo(baseName = "revert_274911", comments =
|
||||
+ """
|
||||
+ Revert Old raid's find spawn position logic
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/config/modules/misc/AllowTripwireDupe.java
|
||||
@@ -1,0 +_,27 @@
|
||||
+++ b/src/main/java/me/earthme/luminol/config/modules/misc/TripwireBehaviorConfig.java
|
||||
@@ -1,0 +_,29 @@
|
||||
+package me.earthme.luminol.config.modules.misc;
|
||||
+
|
||||
+import me.earthme.luminol.config.ConfigInfo;
|
||||
+import me.earthme.luminol.config.EnumConfigCategory;
|
||||
+import me.earthme.luminol.config.IConfigModule;
|
||||
+import me.earthme.luminol.config.TransformedConfig;
|
||||
+
|
||||
+public class AllowTripwireDupe implements IConfigModule {
|
||||
+public class TripwireBehaviorConfig implements IConfigModule {
|
||||
+ @ConfigInfo(baseName = "enabled")
|
||||
+ public static boolean enabled = false;
|
||||
+ @TransformedConfig(name = "behavior-mode", category = {"misc", "tripwire_dupe"})
|
||||
+ @ConfigInfo(baseName = "behavior_mode", comments =
|
||||
+ """
|
||||
+ Allowed Value:
|
||||
+ Available Value:
|
||||
+ VANILLA20
|
||||
+ VANILLA21
|
||||
+ MIXED""")
|
||||
Reference in New Issue
Block a user