Update to Minecraft 1.17.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-07-07 00:00:00 +10:00
parent 0392f45e9c
commit e8c9836ec9
59 changed files with 428 additions and 492 deletions

View File

@@ -20,7 +20,7 @@
public abstract class EntityInsentient extends EntityLiving {
private static final DataWatcherObject<Byte> DATA_MOB_FLAGS_ID = DataWatcher.a(EntityInsentient.class, DataWatcherRegistry.BYTE);
@@ -112,6 +125,8 @@
@@ -113,6 +126,8 @@
private BlockPosition restrictCenter;
private float restrictRadius;
@@ -29,7 +29,7 @@
protected EntityInsentient(EntityTypes<? extends EntityInsentient> entitytypes, World world) {
super(entitytypes, world);
this.handItems = NonNullList.a(2, ItemStack.EMPTY);
@@ -135,6 +150,9 @@
@@ -136,6 +151,9 @@
this.initPathfinder();
}
@@ -39,7 +39,7 @@
}
protected void initPathfinder() {}
@@ -215,7 +233,38 @@
@@ -216,7 +234,38 @@
}
public void setGoalTarget(@Nullable EntityLiving entityliving) {
@@ -78,7 +78,7 @@
}
@Override
@@ -442,16 +491,26 @@
@@ -443,16 +492,26 @@
nbttagcompound.setBoolean("NoAI", this.isNoAI());
}
@@ -107,7 +107,7 @@
NBTTagList nbttaglist;
int i;
@@ -498,6 +557,11 @@
@@ -499,6 +558,11 @@
}
this.setNoAI(nbttagcompound.getBoolean("NoAI"));
@@ -119,7 +119,7 @@
}
@Override
@@ -561,7 +625,7 @@
@@ -562,7 +626,7 @@
protected void b(EntityItem entityitem) {
ItemStack itemstack = entityitem.getItemStack();
@@ -128,7 +128,7 @@
this.a(entityitem);
this.receive(entityitem, itemstack.getCount());
entityitem.die();
@@ -570,15 +634,29 @@
@@ -571,15 +635,29 @@
}
public boolean j(ItemStack itemstack) {
@@ -159,7 +159,7 @@
}
this.b(enumitemslot, itemstack);
@@ -691,18 +769,18 @@
@@ -692,18 +770,18 @@
EntityHuman entityhuman = this.level.findNearbyPlayer(this, -1.0D);
if (entityhuman != null) {
@@ -181,7 +181,7 @@
this.die();
} else if (d0 < (double) l) {
this.noActionTime = 0;
@@ -717,6 +795,7 @@
@@ -718,6 +796,7 @@
@Override
protected final void doTick() {
++this.noActionTime;
@@ -189,7 +189,7 @@
this.level.getMethodProfiler().enter("sensing");
this.sensing.a();
this.level.getMethodProfiler().exit();
@@ -1100,6 +1179,12 @@
@@ -1101,6 +1180,12 @@
if (!this.isAlive()) {
return EnumInteractionResult.PASS;
} else if (this.getLeashHolder() == entityhuman) {
@@ -202,7 +202,7 @@
this.unleash(true, !entityhuman.getAbilities().instabuild);
return EnumInteractionResult.a(this.level.isClientSide);
} else {
@@ -1118,6 +1203,12 @@
@@ -1119,6 +1204,12 @@
ItemStack itemstack = entityhuman.b(enumhand);
if (itemstack.a(Items.LEAD) && this.a(entityhuman)) {
@@ -215,7 +215,7 @@
this.setLeashHolder(entityhuman, true);
itemstack.subtract(1);
return EnumInteractionResult.a(this.level.isClientSide);
@@ -1133,7 +1224,7 @@
@@ -1134,7 +1225,7 @@
if (itemstack.getItem() instanceof ItemMonsterEgg) {
if (this.level instanceof WorldServer) {
ItemMonsterEgg itemmonsteregg = (ItemMonsterEgg) itemstack.getItem();
@@ -224,7 +224,7 @@
optional.ifPresent((entityinsentient) -> {
this.a(entityhuman, entityinsentient);
@@ -1183,12 +1274,19 @@
@@ -1184,12 +1275,19 @@
return this.restrictRadius != -1.0F;
}
@@ -245,7 +245,7 @@
t0.s(this);
t0.setBaby(this.isBaby());
@@ -1220,7 +1318,12 @@
@@ -1221,7 +1319,12 @@
}
}
@@ -259,7 +259,7 @@
if (this.isPassenger()) {
Entity entity = this.getVehicle();
@@ -1240,6 +1343,7 @@
@@ -1241,6 +1344,7 @@
if (this.leashHolder != null) {
if (!this.isAlive() || !this.leashHolder.isAlive()) {
@@ -267,7 +267,7 @@
this.unleash(true, true);
}
@@ -1251,7 +1355,9 @@
@@ -1252,7 +1356,9 @@
this.leashHolder = null;
this.leashInfoTag = null;
if (!this.level.isClientSide && flag1) {
@@ -277,7 +277,7 @@
}
if (!this.level.isClientSide && flag && this.level instanceof WorldServer) {
@@ -1301,6 +1407,7 @@
@@ -1302,6 +1408,7 @@
boolean flag1 = super.a(entity, flag);
if (flag1 && this.isLeashed()) {
@@ -285,7 +285,7 @@
this.unleash(true, true);
}
@@ -1396,7 +1503,14 @@
@@ -1397,7 +1504,14 @@
int i = EnchantmentManager.getFireAspectEnchantmentLevel(this);
if (i > 0) {
@@ -301,7 +301,7 @@
}
boolean flag = entity.damageEntity(DamageSource.mobAttack(this), f);
@@ -1464,9 +1578,10 @@
@@ -1465,9 +1579,10 @@
@Override
protected void cc() {
super.cc();