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,7 +1,7 @@
--- a/net/minecraft/world/entity/animal/EntityWolf.java
+++ b/net/minecraft/world/entity/animal/EntityWolf.java
@@ -62,6 +62,11 @@
import net.minecraft.world.level.block.state.IBlockData;
@@ -63,6 +63,11 @@
import net.minecraft.world.level.gameevent.GameEvent;
import net.minecraft.world.phys.Vec3D;
+// CraftBukkit start
@@ -11,18 +11,18 @@
+
public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable {
private static final DataWatcherObject<Boolean> br = DataWatcher.a(EntityWolf.class, DataWatcherRegistry.i);
@@ -101,7 +106,7 @@
private static final DataWatcherObject<Boolean> DATA_INTERESTED_ID = DataWatcher.a(EntityWolf.class, DataWatcherRegistry.BOOLEAN);
@@ -104,7 +109,7 @@
this.goalSelector.a(10, new PathfinderGoalRandomLookaround(this));
this.targetSelector.a(1, new PathfinderGoalOwnerHurtByTarget(this));
this.targetSelector.a(2, new PathfinderGoalOwnerHurtTarget(this));
- this.targetSelector.a(3, (new PathfinderGoalHurtByTarget(this, new Class[0])).a());
+ this.targetSelector.a(3, (new PathfinderGoalHurtByTarget(this, new Class[0])).a(new Class[0])); // CraftBukkit - decompile error
this.targetSelector.a(4, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::a_));
this.targetSelector.a(5, new PathfinderGoalRandomTargetNonTamed<>(this, EntityAnimal.class, false, EntityWolf.bq));
this.targetSelector.a(6, new PathfinderGoalRandomTargetNonTamed<>(this, EntityTurtle.class, false, EntityTurtle.bo));
@@ -113,6 +118,24 @@
return EntityInsentient.p().a(GenericAttributes.MOVEMENT_SPEED, 0.30000001192092896D).a(GenericAttributes.MAX_HEALTH, 8.0D).a(GenericAttributes.ATTACK_DAMAGE, 2.0D);
this.targetSelector.a(5, new PathfinderGoalRandomTargetNonTamed<>(this, EntityAnimal.class, false, EntityWolf.PREY_SELECTOR));
this.targetSelector.a(6, new PathfinderGoalRandomTargetNonTamed<>(this, EntityTurtle.class, false, EntityTurtle.BABY_ON_LAND_SELECTOR));
@@ -116,6 +121,24 @@
return EntityInsentient.w().a(GenericAttributes.MOVEMENT_SPEED, 0.30000001192092896D).a(GenericAttributes.MAX_HEALTH, 8.0D).a(GenericAttributes.ATTACK_DAMAGE, 2.0D);
}
+ // CraftBukkit - add overriden version
@@ -46,7 +46,7 @@
@Override
protected void initDatawatcher() {
super.initDatawatcher();
@@ -259,7 +282,7 @@
@@ -287,7 +310,7 @@
} else {
Entity entity = damagesource.getEntity();
@@ -55,7 +55,7 @@
if (entity != null && !(entity instanceof EntityHuman) && !(entity instanceof EntityArrow)) {
f = (f + 1.0F) / 2.0F;
}
@@ -284,7 +307,7 @@
@@ -312,7 +335,7 @@
super.setTamed(flag);
if (flag) {
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(20.0D);
@@ -64,16 +64,16 @@
} else {
this.getAttributeInstance(GenericAttributes.MAX_HEALTH).setValue(8.0D);
}
@@ -308,7 +331,7 @@
@@ -336,7 +359,7 @@
itemstack.subtract(1);
}
- this.heal((float) item.getFoodInfo().getNutrition());
+ this.heal((float) item.getFoodInfo().getNutrition(), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // CraftBukkit
this.a(GameEvent.MOB_INTERACT, this.cT());
return EnumInteractionResult.SUCCESS;
}
@@ -319,7 +342,7 @@
@@ -348,7 +371,7 @@
this.setWillSit(!this.isWillSit());
this.jumping = false;
this.navigation.o();
@@ -82,7 +82,7 @@
return EnumInteractionResult.SUCCESS;
}
@@ -341,7 +364,8 @@
@@ -370,7 +393,8 @@
itemstack.subtract(1);
}