Compare commits

..

1 Commits

Author SHA1 Message Date
Helvetica Volubi
d985455525 fix: introduced two patches from leaves to fix some bugs
update [Fix Incorrect Collision Behavior for Block Shape] to [Configurable collision behavior]

fix chunk reload detector
2025-06-04 13:16:00 +08:00
6 changed files with 31 additions and 50 deletions

View File

@@ -19,8 +19,8 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 22
distribution: 'zulu'
java-version: '22'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
@@ -28,16 +28,17 @@ jobs:
- name: Configure Git User Details
run: git config --global user.email "ci@luminolmc.com" && git config --global user.name "LuminolMC CI"
- name: Apply All Patches
- name: Apply Patches
run: ./gradlew applyAllPatches
- name: CreateMojmapPaperclipJar
- name: CreateJar
run: ./gradlew createMojmapPaperclipJar
- name: Publish to repo
if: github.event_name != 'pull_request'
continue-on-error: true
run: ./gradlew generateDevelopmentBundle publish -PpublishDevBundle=true
run: |
./gradlew generateDevelopmentBundle publish -PpublishDevBundle=true
env:
PRIVATE_MAVEN_REPO_PASSWORD: ${{ secrets.PRIVATE_MAVEN_REPO_PASSWORD }}
PRIVATE_MAVEN_REPO_USERNAME: ${{ secrets.PRIVATE_MAVEN_REPO_USERNAME }}
@@ -45,8 +46,8 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.project_id_b }} CI Artifacts
path: luminol-server/build/libs/*-paperclip-*-mojmap.jar
name: "${{ env.project_id_b }} CI Artifacts"
path: "luminol-server/build/libs/*-paperclip-*-mojmap.jar"
- name: SetENV
if: github.event_name != 'pull_request'
@@ -63,8 +64,9 @@ jobs:
This release is automatically compiled by GitHub Actions
### Commit Message
${{ env.commit_msg }}
artifacts: ${{ env.jar_dir }}
artifacts: |
${{ env.jar_dir }}
generateReleaseNotes: true
prerelease: ${{ env.pre }}
prerelease: false
makeLatest: ${{ env.make_latest }}
token: ${{ secrets.GITHUB_TOKEN }}
token: "${{ secrets.GITHUB_TOKEN }}"

View File

@@ -2,7 +2,7 @@ group = me.earthme.luminol
version=1.21.5-R0.1-SNAPSHOT
mcVersion=1.21.5
foliaRef=6c77040ff6ad3401687b1fc49f9d0e8e2e09de87
foliaRef=da0d7cd1beb8eb7b84a5210dcefa6ffb4cce7415
org.gradle.configuration-cache=true
org.gradle.caching=true

View File

@@ -8,7 +8,7 @@ As part of: Leaves (https://github.com/LeavesMC/Leaves/blob/c5f18b7864206cea4411
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 e1bf7bc3cca63101b3c0550b5b4c0d28d0f3776e..d753d550b1df88ad9f2315ec3fc8f342be183c6d 100644
index e1bf7bc3cca63101b3c0550b5b4c0d28d0f3776e..06747460178b7cfccb393cc19d9808cebbb6ddf8 100644
--- a/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java
+++ b/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java
@@ -101,6 +101,14 @@ public final class CollisionUtil {
@@ -35,7 +35,7 @@ index e1bf7bc3cca63101b3c0550b5b4c0d28d0f3776e..d753d550b1df88ad9f2315ec3fc8f342
continue;
}
@@ -2078,6 +2086,18 @@ public final class CollisionUtil {
@@ -2078,6 +2086,17 @@ public final class CollisionUtil {
return ret;
}
@@ -44,9 +44,8 @@ index e1bf7bc3cca63101b3c0550b5b4c0d28d0f3776e..d753d550b1df88ad9f2315ec3fc8f342
+ boolean isBlockShape = blockCollision == Shapes.block();
+ return switch (me.earthme.luminol.config.modules.misc.CollisionBehaviorConfig.behaviorMode) {
+ case "VANILLA" -> !voxelShapeIntersectVanilla(aabb, singleAABB);
+ case "PAPER" -> !voxelShapeIntersect(aabb, singleAABB);
+ default -> isBlockShape && !voxelShapeIntersectVanilla(aabb, singleAABB) || !isBlockShape && !voxelShapeIntersect(aabb, singleAABB);
+ // All other value as BLOCK_SHAPE_VANILLA to process
+ case "BLOCK_SHAPE_VANILLA" -> isBlockShape && !voxelShapeIntersectVanilla(aabb, singleAABB) || !isBlockShape && !voxelShapeIntersect(aabb, singleAABB);
+ default -> !voxelShapeIntersect(aabb, singleAABB); // All other value as Paper to access this
+ };
+ }
+ // Leaves end - Configurable collision behavior

View File

@@ -5,6 +5,19 @@ 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

View File

@@ -1,33 +0,0 @@
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)) {

View File

@@ -14,7 +14,7 @@
+ VANILLA
+ BLOCK_SHAPE_VANILLA
+ PAPER""")
+ public static String behaviorMode = "BLOCK_SHAPE_VANILLA";
+ public static String behaviorMode = "PAPER";
+
+ @Override
+ public EnumConfigCategory getCategory() {