Update to Minecraft 1.21

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-06-14 01:05:00 +10:00
parent 7c6204e1a9
commit eed041d629
255 changed files with 3585 additions and 3261 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/projectile/EntityThrownTrident.java
+++ b/net/minecraft/world/entity/projectile/EntityThrownTrident.java
@@ -23,6 +23,10 @@
@@ -24,6 +24,10 @@
import net.minecraft.world.phys.MovingObjectPositionEntity;
import net.minecraft.world.phys.Vec3D;
@@ -11,7 +11,7 @@
public class EntityThrownTrident extends EntityArrow {
private static final DataWatcherObject<Byte> ID_LOYALTY = DataWatcher.defineId(EntityThrownTrident.class, DataWatcherRegistry.BYTE);
@@ -68,7 +72,7 @@
@@ -69,7 +73,7 @@
this.spawnAtLocation(this.getPickupItem(), 0.1F);
}
@@ -20,12 +20,12 @@
} else {
this.setNoPhysics(true);
Vec3D vec3d = entity.getEyePosition().subtract(this.position());
@@ -152,7 +156,7 @@
if (entitylightning != null) {
entitylightning.moveTo(Vec3D.atBottomCenterOf(blockposition));
entitylightning.setCause(entity1 instanceof EntityPlayer ? (EntityPlayer) entity1 : null);
- this.level().addFreshEntity(entitylightning);
+ ((WorldServer) this.level()).strikeLightning(entitylightning, org.bukkit.event.weather.LightningStrikeEvent.Cause.TRIDENT); // CraftBukkit
soundeffect = SoundEffects.TRIDENT_THUNDER;
f1 = 5.0F;
}
@@ -129,7 +133,7 @@
world = this.level();
if (world instanceof WorldServer) {
- worldserver = (WorldServer) world;
+ WorldServer worldserver = (WorldServer) world; // CraftBukkit - decompile error
EnchantmentManager.doPostAttackEffectsWithItemSource(worldserver, entity, damagesource, this.getWeaponItem());
}