Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 2c4beb962b
commit d3a23f42c3
522 changed files with 8501 additions and 6477 deletions

View File

@@ -1,12 +1,12 @@
--- a/net/minecraft/world/effect/InfestedMobEffect.java
+++ b/net/minecraft/world/effect/InfestedMobEffect.java
@@ -47,7 +47,11 @@
@@ -48,7 +48,11 @@
entitysilverfish.moveTo(d0, d1, d2, world.getRandom().nextFloat() * 360.0F, 0.0F);
entitysilverfish.moveTo(d0, d1, d2, worldserver.getRandom().nextFloat() * 360.0F, 0.0F);
entitysilverfish.setDeltaMovement(new Vec3D(vector3f));
- world.addFreshEntity(entitysilverfish);
- worldserver.addFreshEntity(entitysilverfish);
+ // CraftBukkit start
+ if (!world.addFreshEntity(entitysilverfish, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT)) {
+ if (!worldserver.addFreshEntity(entitysilverfish, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT)) {
+ return;
+ }
+ // CraftBukkit end