Update to Minecraft 1.19

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-06-08 02:00:00 +10:00
parent 91d9aa9a89
commit 25f3b50f6b
332 changed files with 3628 additions and 2559 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/EntityInsentient.java
+++ b/net/minecraft/world/entity/EntityInsentient.java
@@ -72,6 +72,19 @@
@@ -75,6 +75,19 @@
import net.minecraft.world.level.pathfinder.PathType;
import net.minecraft.world.level.storage.loot.LootTableInfo;
@@ -20,7 +20,7 @@
public abstract class EntityInsentient extends EntityLiving {
private static final DataWatcherObject<Byte> DATA_MOB_FLAGS_ID = DataWatcher.defineId(EntityInsentient.class, DataWatcherRegistry.BYTE);
@@ -116,6 +129,8 @@
@@ -121,6 +134,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.withSize(2, ItemStack.EMPTY);
@@ -141,6 +156,12 @@
@@ -146,6 +161,12 @@
}
@@ -42,7 +42,7 @@
protected void registerGoals() {}
public static AttributeProvider.Builder createMobAttributes() {
@@ -219,7 +240,38 @@
@@ -224,7 +245,38 @@
}
public void setTarget(@Nullable EntityLiving entityliving) {
@@ -81,7 +81,7 @@
}
@Override
@@ -446,16 +498,26 @@
@@ -453,16 +505,26 @@
nbttagcompound.putBoolean("NoAI", this.isNoAi());
}
@@ -110,7 +110,7 @@
NBTTagList nbttaglist;
int i;
@@ -502,6 +564,11 @@
@@ -509,6 +571,11 @@
}
this.setNoAi(nbttagcompound.getBoolean("NoAI"));
@@ -122,7 +122,7 @@
}
@Override
@@ -565,7 +632,7 @@
@@ -577,7 +644,7 @@
protected void pickUpItem(EntityItem entityitem) {
ItemStack itemstack = entityitem.getItem();
@@ -131,7 +131,7 @@
this.onItemPickup(entityitem);
this.take(entityitem, itemstack.getCount());
entityitem.discard();
@@ -574,15 +641,29 @@
@@ -586,15 +653,29 @@
}
public boolean equipItemIfPossible(ItemStack itemstack) {
@@ -162,7 +162,7 @@
}
this.setItemSlotAndDropWhenKilled(enumitemslot, itemstack);
@@ -721,6 +802,7 @@
@@ -732,6 +813,7 @@
@Override
protected final void serverAiStep() {
++this.noActionTime;
@@ -170,7 +170,7 @@
this.level.getProfiler().push("sensing");
this.sensing.tick();
this.level.getProfiler().pop();
@@ -1116,6 +1198,12 @@
@@ -1125,6 +1207,12 @@
if (!this.isAlive()) {
return EnumInteractionResult.PASS;
} else if (this.getLeashHolder() == entityhuman) {
@@ -183,7 +183,7 @@
this.dropLeash(true, !entityhuman.getAbilities().instabuild);
return EnumInteractionResult.sidedSuccess(this.level.isClientSide);
} else {
@@ -1134,6 +1222,12 @@
@@ -1148,6 +1236,12 @@
ItemStack itemstack = entityhuman.getItemInHand(enumhand);
if (itemstack.is(Items.LEAD) && this.canBeLeashed(entityhuman)) {
@@ -196,7 +196,7 @@
this.setLeashedTo(entityhuman, true);
itemstack.shrink(1);
return EnumInteractionResult.sidedSuccess(this.level.isClientSide);
@@ -1149,7 +1243,7 @@
@@ -1163,7 +1257,7 @@
if (itemstack.getItem() instanceof ItemMonsterEgg) {
if (this.level instanceof WorldServer) {
ItemMonsterEgg itemmonsteregg = (ItemMonsterEgg) itemstack.getItem();
@@ -205,7 +205,7 @@
optional.ifPresent((entityinsentient) -> {
this.onOffspringSpawnedFromEgg(entityhuman, entityinsentient);
@@ -1199,12 +1293,19 @@
@@ -1213,12 +1307,19 @@
return this.restrictRadius != -1.0F;
}
@@ -226,7 +226,7 @@
t0.copyPosition(this);
t0.setBaby(this.isBaby());
@@ -1236,7 +1337,12 @@
@@ -1250,7 +1351,12 @@
}
}
@@ -240,7 +240,7 @@
if (this.isPassenger()) {
Entity entity = this.getVehicle();
@@ -1256,6 +1362,7 @@
@@ -1270,6 +1376,7 @@
if (this.leashHolder != null) {
if (!this.isAlive() || !this.leashHolder.isAlive()) {
@@ -248,7 +248,7 @@
this.dropLeash(true, true);
}
@@ -1267,7 +1374,9 @@
@@ -1281,7 +1388,9 @@
this.leashHolder = null;
this.leashInfoTag = null;
if (!this.level.isClientSide && flag1) {
@@ -258,7 +258,7 @@
}
if (!this.level.isClientSide && flag && this.level instanceof WorldServer) {
@@ -1317,6 +1426,7 @@
@@ -1331,6 +1440,7 @@
boolean flag1 = super.startRiding(entity, flag);
if (flag1 && this.isLeashed()) {
@@ -266,7 +266,7 @@
this.dropLeash(true, true);
}
@@ -1341,7 +1451,9 @@
@@ -1355,7 +1465,9 @@
}
if (this.tickCount > 100) {
@@ -276,7 +276,7 @@
this.leashInfoTag = null;
}
}
@@ -1412,7 +1524,14 @@
@@ -1432,7 +1544,14 @@
int i = EnchantmentManager.getFireAspect(this);
if (i > 0) {
@@ -292,7 +292,7 @@
}
boolean flag = entity.hurt(DamageSource.mobAttack(this), f);
@@ -1480,9 +1599,10 @@
@@ -1500,9 +1619,10 @@
@Override
protected void removeAfterChangingDimensions() {
super.removeAfterChangingDimensions();