9
0
mirror of https://github.com/LeavesMC/Leaves.git synced 2025-12-19 14:59:32 +00:00

Update paper, revert #632 (#662)

This commit is contained in:
Lumine1909
2025-08-07 19:07:13 -07:00
committed by GitHub
parent 3c09044e86
commit e05f3f7c6a
7 changed files with 10 additions and 44 deletions

View File

@@ -1,7 +1,7 @@
group=org.leavesmc.leaves group=org.leavesmc.leaves
version=1.21.8-R0.1-SNAPSHOT version=1.21.8-R0.1-SNAPSHOT
mcVersion=1.21.8 mcVersion=1.21.8
paperRef=dbc367ba2d696fec2433b15ed23a893a34895638 paperRef=a664311f0fb2643e45e2ef8aa7683af94f75ea14
preVersion=true preVersion=true
org.gradle.caching=true org.gradle.caching=true

View File

@@ -1,34 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lumine1909 <133463833Lumine1909@users.noreply.github.com>
Date: Thu, 31 Jul 2025 11:44:14 +0800
Subject: [PATCH] Fix endermite spawn position
diff --git a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
index 4b04ca7d50d7a85827bd89fff24434e603e99579..8030bd1935cdcf5a2673142bc3a19f7cc7be405b 100644
--- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
+++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
@@ -119,6 +119,9 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
Vec3 vec3 = this.oldPosition();
if (owner instanceof ServerPlayer serverPlayer) {
if (serverPlayer.connection.isAcceptingMessages()) {
+ // Leaves start - vanilla endermite spawn
+ double x = serverPlayer.getX(), y = serverPlayer.getY(), z = serverPlayer.getZ();
+ float yaw = serverPlayer.getYRot(), pitch = serverPlayer.getXRot();
// CraftBukkit start
ServerPlayer serverPlayer1 = serverPlayer.teleport(new TeleportTransition(serverLevel, vec3, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.ENDER_PEARL));
if (serverPlayer1 == null) {
@@ -129,7 +132,12 @@ public class ThrownEnderpearl extends ThrowableItemProjectile {
if (this.random.nextFloat() < 0.05F && serverLevel.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING)) {
Endermite endermite = EntityType.ENDERMITE.create(serverLevel, EntitySpawnReason.TRIGGERED);
if (endermite != null) {
- endermite.snapTo(owner.getX(), owner.getY(), owner.getZ(), owner.getYRot(), owner.getXRot());
+ if (org.leavesmc.leaves.LeavesConfig.fix.vanillaEndermiteSpawn) {
+ endermite.snapTo(x, y, z, yaw, pitch);
+ } else {
+ endermite.snapTo(owner.getX(), owner.getY(), owner.getZ(), owner.getYRot(), owner.getXRot());
+ }
+ // Leaves end - vanilla endermite spawn
serverLevel.addFreshEntity(endermite, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.ENDER_PEARL);
}
}

View File

@@ -300,7 +300,7 @@ index 7781ca07a0c8fe1140f341b695e66de95802ee2e..f190e8f244d011bdb7f04ccf0f0a35cb
+ // Leaves end - Lithium Sleeping Block Entity + // Leaves end - Lithium Sleeping Block Entity
} }
diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java
index 0541ac612679fcfd49c71c005bc4fb2cc7101188..1fc56b3840c67971669885e56467c3221f931cfd 100644 index c1ca84cf0dbb4fd091cfab517721c87e0f9074a0..5f70277c3548a9cd423585d37497842267652620 100644
--- a/net/minecraft/world/inventory/AbstractContainerMenu.java --- a/net/minecraft/world/inventory/AbstractContainerMenu.java
+++ b/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
@@ -931,6 +931,7 @@ public abstract class AbstractContainerMenu { @@ -931,6 +931,7 @@ public abstract class AbstractContainerMenu {

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Bring back LivingEntity effect CME
diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java
index 72ac89d349db718125cfb9aac6453c2cba708919..05cb6f9ffaefad784dfe4b5485f1ee5f11ea017b 100644 index 72ac89d349db718125cfb9aac6453c2cba708919..817b55dfb131b0892a670df1ad00d892b855bf0e 100644
--- a/net/minecraft/world/entity/LivingEntity.java --- a/net/minecraft/world/entity/LivingEntity.java
+++ b/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java
@@ -1151,7 +1151,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -1151,7 +1151,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin

View File

@@ -63,10 +63,10 @@ index c775b2956d008338d7d48ab709013b7111b1ac8f..317aee5719548beaf7932f53c6d1ffc9
// Special case complex part, since there is no extra entity type for them // Special case complex part, since there is no extra entity type for them
if (entity instanceof EnderDragonPart complexPart) { if (entity instanceof EnderDragonPart complexPart) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index c0ef55c206af2391b71c4326fd294dbb7d4bd46c..0c8aab1b1b935918a9f67ce21be5c498d0a3828c 100644 index 322a1e38799a7bf45b8d3ee151b0b62df45d55d7..7a5e29746890bfbb7ef8e910e787e82c122bdf46 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2208,7 +2208,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa @@ -2209,7 +2209,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa
@Override @Override
public boolean canSee(Player player) { public boolean canSee(Player player) {

View File

@@ -33,10 +33,10 @@ index 006ee2e04fe323246822de00ef3e659fb6b91ce9..edd9a88605c4aab5263b3455ac321c30
+ // Leaves end - Bytebuf API + // Leaves end - Bytebuf API
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0c8aab1b1b935918a9f67ce21be5c498d0a3828c..752c35635cd89abec57eec42d3e8ae196ac76869 100644 index 7a5e29746890bfbb7ef8e910e787e82c122bdf46..e24906214a1e87f6c589e4edd0e2499a5fca3cc0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3515,4 +3515,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa @@ -3522,4 +3522,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player, PluginMessa
public PlayerGameConnection getConnection() { public PlayerGameConnection getConnection() {
return this.getHandle().connection.playerGameConnection; return this.getHandle().connection.playerGameConnection;
} }

View File

@@ -1238,9 +1238,6 @@ public final class LeavesConfig {
@GlobalConfig("vanilla-fluid-pushing") @GlobalConfig("vanilla-fluid-pushing")
public boolean vanillaFluidPushing = true; public boolean vanillaFluidPushing = true;
@GlobalConfig("vanilla-endermite-spawn")
public boolean vanillaEndermiteSpawn = true;
@GlobalConfig(value = "collision-behavior") @GlobalConfig(value = "collision-behavior")
public CollisionBehavior collisionBehavior = CollisionBehavior.BLOCK_SHAPE_VANILLA; public CollisionBehavior collisionBehavior = CollisionBehavior.BLOCK_SHAPE_VANILLA;
@@ -1250,5 +1247,8 @@ public final class LeavesConfig {
@RemovedConfig(name = "spigot-EndPlatform-destroy", category = "fix") @RemovedConfig(name = "spigot-EndPlatform-destroy", category = "fix")
private final boolean removed = false; private final boolean removed = false;
@RemovedConfig(name = "vanilla-endermite-spawn", category = "fix")
public boolean vanillaEndermiteSpawn = true;
} }
} }