Begin remigrate to Shiroha

uhm
This commit is contained in:
2026-07-14 11:32:51 +08:00
parent 5661499e95
commit 576a9a44c8
60 changed files with 379 additions and 379 deletions
@@ -12,7 +12,7 @@ index b31b55f00e2ce1bd6c1011fe852bd1dbb37de524..4e52c3a8887781a2299852c0c0d6f0fd
if (entity instanceof ThrownEnderpearl enderpearl) {
this.addEnderPearl(CoordinateUtils.getChunkKey(enderpearl.chunkPosition()), enderpearl.getId()); // Folia - region threading
}
+ if (entity instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon dragon) dragon.syncDragonPartsAfterTeleportTransform(); // Camellia - Fix dragon part desync
+ if (entity instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon dragon) dragon.syncDragonPartsAfterTeleportTransform(); // Shiroha - Fix dragon part desync
entity.registerScheduler(); // Paper - optimise Folia entity scheduler
}
@@ -24,7 +24,7 @@ index 1bf85a60b3223c9a44bb3e3d6bffe8eb093a50e8..c5a9d380f318f176a2bf5d30a10a6d52
Entity copy = this.getType().create(destination, EntitySpawnReason.DIMENSION_TRAVEL);
copy.restoreFrom(this);
copy.transform(pos, yaw, pitch, velocity);
+ if (copy instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon dragon) dragon.syncDragonPartsAfterTeleportTransform(); // Camellia - Fix dragon part desync
+ if (copy instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon dragon) dragon.syncDragonPartsAfterTeleportTransform(); // Shiroha - Fix dragon part desync
// vanilla code used to call remove _after_ copying, and some stuff is required to be after copy - so add hook here
// for example, clearing of inventory after switching dimensions
this.postRemoveAfterChangingDimensions();
@@ -37,11 +37,11 @@ index ab921ab4b4cc860abd77744f2bd201013e136e51..cf227919723aeb1d33565787996821a1
}
// Paper end - init expToDrop for already dying spawned dragon
+
+ // Camellia start - Fix dragon part desync
+ // Shiroha start - Fix dragon part desync
+ public void syncDragonPartsAfterTeleportTransform() {
+ for (EnderDragonPart part : this.subEntities) {
+ this.tickPart(part, 0.0, 0.0, 0.0); // offset -> 0.0
+ }
+ }
+ // Camellia end
+ // Shiroha end
}