Compare commits

..

2 Commits

Author SHA1 Message Date
MrHua269
25b9e3f213 Close channel before replacing file with tmp file 2025-06-15 10:09:03 +08:00
MrHua269
4855a4f76f Updated Upstream(Folia) 2025-06-15 10:06:11 +08:00
3 changed files with 4 additions and 28 deletions

View File

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

View File

@@ -1,26 +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..5760ae39e8c452b8291353ed59ce7f8ef4d43dc1 100644
--- a/net/minecraft/world/entity/projectile/ThrownEgg.java
+++ b/net/minecraft/world/entity/projectile/ThrownEgg.java
@@ -97,12 +97,13 @@ 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))

View File

@@ -1,6 +1,6 @@
--- /dev/null
+++ b/src/main/java/me/earthme/luminol/data/BufferedLinearRegionFile.java
@@ -1,0 +_,629 @@
@@ -1,0 +_,631 @@
+package me.earthme.luminol.data;
+
+import abomination.IRegionFile;
@@ -213,6 +213,8 @@
+ this.currentAcquiredIndex = tempChannel.size();
+ }
+
+ this.channel.close();
+
+ Files.move(
+ new File(this.filePath.toString() + ".tmp").toPath(),
+ this.filePath,