Update to Minecraft 1.20.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-09-22 02:40:00 +10:00
parent 193398c0ff
commit 8a3c8cfcd4
238 changed files with 2448 additions and 2344 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/raid/Raid.java
+++ b/net/minecraft/world/entity/raid/Raid.java
@@ -174,6 +174,12 @@
@@ -176,6 +176,12 @@
return this.status == Raid.Status.LOSS;
}
@@ -13,7 +13,7 @@
public float getTotalHealth() {
return this.totalHealth;
}
@@ -270,6 +276,7 @@
@@ -272,6 +278,7 @@
this.active = this.level.hasChunkAt(this.center);
if (this.level.getDifficulty() == EnumDifficulty.PEACEFUL) {
@@ -21,7 +21,7 @@
this.stop();
return;
}
@@ -289,13 +296,16 @@
@@ -291,13 +298,16 @@
if (!this.level.isVillage(this.center)) {
if (this.groupsSpawned > 0) {
this.status = Raid.Status.LOSS;
@@ -38,7 +38,7 @@
this.stop();
return;
}
@@ -369,6 +379,7 @@
@@ -371,6 +381,7 @@
}
if (j > 3) {
@@ -46,7 +46,7 @@
this.stop();
break;
}
@@ -381,6 +392,7 @@
@@ -383,6 +394,7 @@
this.status = Raid.Status.VICTORY;
Iterator iterator = this.heroesOfTheVillage.iterator();
@@ -54,11 +54,12 @@
while (iterator.hasNext()) {
UUID uuid = (UUID) iterator.next();
Entity entity = this.level.getEntity(uuid);
@@ -394,9 +406,11 @@
@@ -397,10 +409,12 @@
entityplayer.awardStat(StatisticList.RAID_WIN);
CriterionTriggers.RAID_WIN.trigger(entityplayer);
+ winners.add(entityplayer.getBukkitEntity()); // CraftBukkit
entityplayer.awardStat(StatisticList.RAID_WIN);
CriterionTriggers.RAID_WIN.trigger(entityplayer);
+ winners.add(entityplayer.getBukkitEntity()); // CraftBukkit
}
}
}
}
@@ -66,7 +67,7 @@
}
}
@@ -404,6 +418,7 @@
@@ -408,6 +422,7 @@
} else if (this.isOver()) {
++this.celebrationTicks;
if (this.celebrationTicks >= 600) {
@@ -74,7 +75,7 @@
this.stop();
return;
}
@@ -540,6 +555,10 @@
@@ -544,6 +559,10 @@
int j = araid_wave.length;
int k = 0;
@@ -85,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);
@@ -555,9 +574,11 @@
@@ -559,9 +578,11 @@
entityraider.setPatrolLeader(true);
this.setLeader(i, entityraider);
flag = true;
@@ -97,7 +98,7 @@
if (raid_wave.entityType == EntityTypes.RAVAGER) {
EntityRaider entityraider1 = null;
@@ -576,6 +597,7 @@
@@ -580,6 +601,7 @@
this.joinRaid(i, entityraider1, blockposition, false);
entityraider1.moveTo(blockposition, 0.0F, 0.0F);
entityraider1.startRiding(entityraider);
@@ -105,7 +106,7 @@
}
}
@@ -593,6 +615,7 @@
@@ -597,6 +619,7 @@
++this.groupsSpawned;
this.updateBossbar();
this.setDirty();
@@ -113,7 +114,7 @@
}
public void joinRaid(int i, EntityRaider entityraider, @Nullable BlockPosition blockposition, boolean flag) {
@@ -608,7 +631,7 @@
@@ -612,7 +635,7 @@
entityraider.finalizeSpawn(this.level, this.level.getCurrentDifficultyAt(blockposition), EnumMobSpawn.EVENT, (GroupDataEntity) null, (NBTTagCompound) null);
entityraider.applyRaidBuffs(i, false);
entityraider.setOnGround(true);
@@ -122,7 +123,7 @@
}
}
@@ -858,6 +881,12 @@
@@ -862,6 +885,12 @@
this.heroesOfTheVillage.add(entity.getUUID());
}