Update to Minecraft 1.17

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-06-11 15:00:00 +10:00
parent 75faba7fde
commit b3a8254758
619 changed files with 10708 additions and 8451 deletions

View File

@@ -1,15 +1,15 @@
--- a/net/minecraft/world/entity/animal/EntityDolphin.java
+++ b/net/minecraft/world/entity/animal/EntityDolphin.java
@@ -173,7 +173,7 @@
this.goalSelector.a(8, new EntityDolphin.d());
@@ -176,7 +176,7 @@
this.goalSelector.a(8, new EntityDolphin.c());
this.goalSelector.a(8, new PathfinderGoalFollowBoat(this));
this.goalSelector.a(9, new PathfinderGoalAvoidTarget<>(this, EntityGuardian.class, 8.0F, 1.0D, 1.0D));
- this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityGuardian.class})).a());
+ this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityGuardian.class})).a(new Class[0])); // CraftBukkit - decompile error
}
public static AttributeProvider.Builder eM() {
@@ -240,6 +240,12 @@
public static AttributeProvider.Builder fv() {
@@ -243,6 +243,12 @@
ItemStack itemstack = entityitem.getItemStack();
if (this.canPickup(itemstack)) {
@@ -21,31 +21,31 @@
+ // CraftBukkit end
this.a(entityitem);
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
this.dropChanceHand[EnumItemSlot.MAINHAND.b()] = 2.0F;
@@ -387,7 +393,7 @@
this.handDropChances[EnumItemSlot.MAINHAND.b()] = 2.0F;
@@ -411,7 +417,7 @@
@Override
public boolean a() {
- return this.a.gotFish() && this.a.getAirTicks() >= 100;
+ return this.a.gotFish() && this.a.getAirTicks() >= 100 && this.a.world.getWorld().canGenerateStructures(); // MC-151364, SPIGOT-5494: hangs if generate-structures=false
- return this.dolphin.gotFish() && this.dolphin.getAirTicks() >= 100;
+ return this.dolphin.gotFish() && this.dolphin.getAirTicks() >= 100 && this.dolphin.level.getWorld().canGenerateStructures(); // MC-151364, SPIGOT-5494: hangs if generate-structures=false
}
@Override
@@ -496,7 +502,7 @@
@@ -520,7 +526,7 @@
@Override
public void c() {
- this.c.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100));
+ this.c.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.DOLPHIN); // CraftBukkit
- this.player.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), this.dolphin);
+ this.player.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), this.dolphin, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.DOLPHIN); // CraftBukkit
}
@Override
@@ -515,7 +521,7 @@
@@ -539,7 +545,7 @@
}
if (this.c.isSwimming() && this.c.world.random.nextInt(6) == 0) {
- this.c.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100));
+ this.c.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.DOLPHIN); // CraftBukkit
if (this.player.isSwimming() && this.player.level.random.nextInt(6) == 0) {
- this.player.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), this.dolphin);
+ this.player.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), this.dolphin, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.DOLPHIN); // CraftBukkit
}
}