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

@@ -38,15 +38,15 @@
this.stop();
return;
}
@@ -380,6 +390,7 @@
@@ -374,6 +384,7 @@
}
if (j > 3) {
if (j > 5) {
+ org.bukkit.craftbukkit.event.CraftEventFactory.callRaidStopEvent(this, org.bukkit.event.raid.RaidStopEvent.Reason.UNSPAWNABLE); // CraftBukkit
this.stop();
break;
}
@@ -392,6 +403,7 @@
@@ -386,6 +397,7 @@
this.status = Raid.Status.VICTORY;
Iterator iterator = this.heroesOfTheVillage.iterator();
@@ -54,7 +54,7 @@
while (iterator.hasNext()) {
UUID uuid = (UUID) iterator.next();
Entity entity = this.level.getEntity(uuid);
@@ -406,10 +418,12 @@
@@ -400,10 +412,12 @@
entityplayer.awardStat(StatisticList.RAID_WIN);
CriterionTriggers.RAID_WIN.trigger(entityplayer);
@@ -67,7 +67,7 @@
}
}
@@ -417,6 +431,7 @@
@@ -411,6 +425,7 @@
} else if (this.isOver()) {
++this.celebrationTicks;
if (this.celebrationTicks >= 600) {
@@ -75,7 +75,7 @@
this.stop();
return;
}
@@ -553,6 +568,10 @@
@@ -544,6 +559,10 @@
int j = araid_wave.length;
int k = 0;
@@ -86,7 +86,7 @@
while (k < j) {
Raid.Wave raid_wave = araid_wave[k];
int l = this.getDefaultNumSpawns(raid_wave, i, flag1) + this.getPotentialBonusSpawns(raid_wave, this.random, i, difficultydamagescaler, flag1);
@@ -568,9 +587,11 @@
@@ -559,9 +578,11 @@
entityraider.setPatrolLeader(true);
this.setLeader(i, entityraider);
flag = true;
@@ -98,7 +98,7 @@
if (raid_wave.entityType == EntityTypes.RAVAGER) {
EntityRaider entityraider1 = null;
@@ -589,6 +610,7 @@
@@ -580,6 +601,7 @@
this.joinRaid(i, entityraider1, blockposition, false);
entityraider1.moveTo(blockposition, 0.0F, 0.0F);
entityraider1.startRiding(entityraider);
@@ -106,7 +106,7 @@
}
}
@@ -606,6 +628,7 @@
@@ -597,6 +619,7 @@
++this.groupsSpawned;
this.updateBossbar();
this.setDirty();
@@ -114,8 +114,8 @@
}
public void joinRaid(int i, EntityRaider entityraider, @Nullable BlockPosition blockposition, boolean flag) {
@@ -621,7 +644,7 @@
entityraider.finalizeSpawn(this.level, this.level.getCurrentDifficultyAt(blockposition), EnumMobSpawn.EVENT, (GroupDataEntity) null);
@@ -612,7 +635,7 @@
entityraider.finalizeSpawn(this.level, this.level.getCurrentDifficultyAt(blockposition), EntitySpawnReason.EVENT, (GroupDataEntity) null);
entityraider.applyRaidBuffs(this.level, i, false);
entityraider.setOnGround(true);
- this.level.addFreshEntityWithPassengers(entityraider);
@@ -123,7 +123,7 @@
}
}
@@ -870,6 +893,12 @@
@@ -865,6 +888,12 @@
this.heroesOfTheVillage.add(entity.getUUID());
}