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/raid/EntityRaider.java
+++ b/net/minecraft/world/entity/raid/EntityRaider.java
@@ -45,6 +45,10 @@
@@ -38,6 +38,10 @@
import net.minecraft.world.level.WorldAccess;
import net.minecraft.world.phys.Vec3D;
@@ -11,16 +11,7 @@
public abstract class EntityRaider extends EntityMonsterPatrolling {
protected static final DataWatcherObject<Boolean> IS_CELEBRATING = DataWatcher.defineId(EntityRaider.class, DataWatcherRegistry.BOOLEAN);
@@ -166,7 +170,7 @@
MobEffect mobeffect1 = new MobEffect(MobEffects.BAD_OMEN, 120000, i, false, false, true);
if (!this.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_RAIDS)) {
- entityhuman.addEffect(mobeffect1);
+ entityhuman.addEffect(mobeffect1, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.PATROL_CAPTAIN); // CraftBukkit
}
}
}
@@ -275,7 +279,7 @@
@@ -233,7 +237,7 @@
this.onItemPickup(entityitem);
this.setItemSlot(enumitemslot, itemstack);
this.take(entityitem, itemstack.getCount());
@@ -29,7 +20,7 @@
this.getCurrentRaid().setLeader(this.getWave(), this);
this.setPatrolLeader(true);
} else {
@@ -324,7 +328,7 @@
@@ -282,7 +286,7 @@
private final T mob;
@@ -38,7 +29,7 @@
this.mob = entityraider1;
this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE));
}
@@ -517,7 +521,7 @@
@@ -475,7 +479,7 @@
private final float hostileRadiusSqr;
public final PathfinderTargetCondition shoutTargeting = PathfinderTargetCondition.forNonCombat().range(8.0D).ignoreLineOfSight().ignoreInvisibilityTesting();
@@ -47,7 +38,7 @@
this.mob = entityillagerabstract;
this.hostileRadiusSqr = f * f;
this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE, PathfinderGoal.Type.LOOK));
@@ -540,7 +544,7 @@
@@ -498,7 +502,7 @@
while (iterator.hasNext()) {
EntityRaider entityraider = (EntityRaider) iterator.next();
@@ -56,7 +47,7 @@
}
}
@@ -557,7 +561,7 @@
@@ -515,7 +519,7 @@
while (iterator.hasNext()) {
EntityRaider entityraider = (EntityRaider) iterator.next();