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/animal/EntityBee.java
+++ b/net/minecraft/world/entity/animal/EntityBee.java
@@ -86,6 +86,12 @@
@@ -87,6 +87,12 @@
import net.minecraft.world.level.pathfinder.PathType;
import net.minecraft.world.phys.Vec3D;
@@ -13,7 +13,7 @@
public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityBird {
public static final float FLAP_DEGREES_PER_TICK = 120.32113F;
@@ -185,12 +191,19 @@
@@ -186,12 +192,19 @@
@Override
public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
@@ -35,7 +35,7 @@
nbttagcompound.put("flower_pos", GameProfileSerializer.writeBlockPos(this.getSavedFlowerPos()));
}
@@ -204,8 +217,8 @@
@@ -205,8 +218,8 @@
@Override
public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
@@ -46,16 +46,16 @@
super.readAdditionalSaveData(nbttagcompound);
this.setHasNectar(nbttagcompound.getBoolean("HasNectar"));
this.setHasStung(nbttagcompound.getBoolean("HasStung"));
@@ -232,7 +245,7 @@
@@ -243,7 +256,7 @@
}
if (b0 > 0) {
- ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0), this);
+ ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0), this, EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
- entityliving.addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0), this);
+ entityliving.addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0), this, EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
}
}
@@ -625,11 +638,14 @@
@@ -636,11 +649,14 @@
if (this.isInvulnerableTo(damagesource)) {
return false;
} else {
@@ -72,7 +72,7 @@
}
}
@@ -981,7 +997,7 @@
@@ -992,7 +1008,7 @@
e() {
super();
@@ -81,7 +81,7 @@
this.blacklistedTargets = Lists.newArrayList();
this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE));
}
@@ -1098,7 +1114,7 @@
@@ -1109,7 +1125,7 @@
f() {
super();
@@ -90,7 +90,7 @@
this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE));
}
@@ -1198,7 +1214,7 @@
@@ -1209,7 +1225,7 @@
}
}
@@ -99,7 +99,7 @@
EntityBee.this.level().levelEvent(2011, blockposition, 15);
EntityBee.this.level().setBlockAndUpdate(blockposition, iblockdata1);
EntityBee.this.incrementNumCropsGrownSincePollination();
@@ -1271,7 +1287,7 @@
@@ -1282,7 +1298,7 @@
@Override
protected void alertOther(EntityInsentient entityinsentient, EntityLiving entityliving) {
if (entityinsentient instanceof EntityBee && this.mob.hasLineOfSight(entityliving)) {
@@ -108,7 +108,7 @@
}
}
@@ -1280,7 +1296,7 @@
@@ -1291,7 +1307,7 @@
private static class c extends PathfinderGoalNearestAttackableTarget<EntityHuman> {
c(EntityBee entitybee) {