Update to Minecraft 1.19.3

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2022-12-08 03:00:00 +11:00
parent a13136ada2
commit 8b26bb8f3e
305 changed files with 3331 additions and 2864 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/EntityLiving.java
+++ b/net/minecraft/world/entity/EntityLiving.java
@@ -118,6 +118,30 @@
@@ -119,6 +119,30 @@
import net.minecraft.world.scores.ScoreboardTeam;
import org.slf4j.Logger;
@@ -31,7 +31,7 @@
public abstract class EntityLiving extends Entity {
private static final Logger LOGGER = LogUtils.getLogger();
@@ -228,6 +252,20 @@
@@ -229,6 +253,20 @@
private float swimAmountO;
protected BehaviorController<?> brain;
private boolean skipDropExperience;
@@ -52,7 +52,7 @@
protected EntityLiving(EntityTypes<? extends EntityLiving> entitytypes, World world) {
super(entitytypes, world);
@@ -240,7 +278,9 @@
@@ -241,7 +279,9 @@
this.useItem = ItemStack.EMPTY;
this.lastClimbablePos = Optional.empty();
this.attributes = new AttributeMapBase(AttributeDefaults.getSupplier(entitytypes));
@@ -63,7 +63,7 @@
this.blocksBuilding = true;
this.rotA = (float) ((Math.random() + 1.0D) * 0.009999999776482582D);
this.reapplyPosition();
@@ -307,7 +347,13 @@
@@ -308,7 +348,13 @@
double d1 = Math.min((double) (0.2F + f / 15.0F), 2.5D);
int i = (int) (150.0D * d1);
@@ -78,7 +78,7 @@
}
}
@@ -661,10 +707,16 @@
@@ -660,10 +706,16 @@
}
public void onEquipItem(EnumItemSlot enumitemslot, ItemStack itemstack, ItemStack itemstack1) {
@@ -90,13 +90,13 @@
+ // CraftBukkit end
boolean flag = itemstack1.isEmpty() && itemstack.isEmpty();
if (!flag && !ItemStack.isSameIgnoreDurability(itemstack, itemstack1) && !this.firstTick) {
if (!flag && !ItemStack.isSame(itemstack, itemstack1) && !this.firstTick) {
- if (enumitemslot.getType() == EnumItemSlot.Function.ARMOR) {
+ if (enumitemslot.getType() == EnumItemSlot.Function.ARMOR && !silent) { // CraftBukkit
this.playEquipSound(itemstack1);
}
@@ -742,6 +794,17 @@
@@ -741,6 +793,17 @@
}
}
@@ -114,7 +114,7 @@
if (nbttagcompound.contains("Health", 99)) {
this.setHealth(nbttagcompound.getFloat("Health"));
}
@@ -779,9 +842,32 @@
@@ -778,9 +841,32 @@
}
@@ -147,7 +147,7 @@
try {
while (iterator.hasNext()) {
MobEffectList mobeffectlist = (MobEffectList) iterator.next();
@@ -791,6 +877,12 @@
@@ -790,6 +876,12 @@
this.onEffectUpdated(mobeffect, true, (Entity) null);
})) {
if (!this.level.isClientSide) {
@@ -160,7 +160,7 @@
iterator.remove();
this.onEffectRemoved(mobeffect);
}
@@ -801,6 +893,17 @@
@@ -800,6 +892,17 @@
} catch (ConcurrentModificationException concurrentmodificationexception) {
;
}
@@ -178,7 +178,7 @@
if (this.effectsDirty) {
if (!this.level.isClientSide) {
@@ -927,7 +1030,13 @@
@@ -926,7 +1029,13 @@
this.entityData.set(EntityLiving.DATA_EFFECT_COLOR_ID, 0);
}
@@ -192,7 +192,7 @@
if (this.level.isClientSide) {
return false;
} else {
@@ -936,7 +1045,14 @@
@@ -935,7 +1044,14 @@
boolean flag;
for (flag = false; iterator.hasNext(); flag = true) {
@@ -208,7 +208,7 @@
iterator.remove();
}
@@ -965,18 +1081,48 @@
@@ -964,18 +1080,48 @@
return this.addEffect(mobeffect, (Entity) null);
}
@@ -258,7 +258,7 @@
return true;
} else {
return false;
@@ -1013,13 +1159,39 @@
@@ -1012,13 +1158,39 @@
return this.getMobType() == EnumMonsterType.UNDEAD;
}
@@ -299,7 +299,7 @@
if (mobeffect != null) {
this.onEffectRemoved(mobeffect);
@@ -1056,20 +1228,55 @@
@@ -1055,20 +1227,55 @@
}
@@ -356,7 +356,7 @@
this.entityData.set(EntityLiving.DATA_HEALTH_ID, MathHelper.clamp(f, 0.0F, this.getMaxHealth()));
}
@@ -1083,7 +1290,7 @@
@@ -1082,7 +1289,7 @@
return false;
} else if (this.level.isClientSide) {
return false;
@@ -365,7 +365,7 @@
return false;
} else if (damagesource.isFire() && this.hasEffect(MobEffects.FIRE_RESISTANCE)) {
return false;
@@ -1094,10 +1301,11 @@
@@ -1093,10 +1300,11 @@
this.noActionTime = 0;
float f1 = f;
@@ -379,7 +379,7 @@
this.hurtCurrentlyUsedShield(f);
f2 = f;
f = 0.0F;
@@ -1115,27 +1323,46 @@
@@ -1116,27 +1324,46 @@
this.animationSpeed = 1.5F;
boolean flag1 = true;
@@ -431,7 +431,7 @@
this.hurtDir = 0.0F;
Entity entity1 = damagesource.getEntity();
@@ -1258,19 +1485,32 @@
@@ -1259,19 +1486,32 @@
EnumHand[] aenumhand = EnumHand.values();
int i = aenumhand.length;
@@ -468,7 +468,7 @@
EntityPlayer entityplayer = (EntityPlayer) this;
entityplayer.awardStat(StatisticList.ITEM_USED.get(Items.TOTEM_OF_UNDYING));
@@ -1278,14 +1518,16 @@
@@ -1279,14 +1519,16 @@
}
this.setHealth(1.0F);
@@ -490,7 +490,7 @@
}
}
@@ -1390,14 +1632,22 @@
@@ -1391,14 +1633,22 @@
IBlockData iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
if (this.level.getBlockState(blockposition).isAir() && iblockdata.canSurvive(this.level, blockposition)) {
@@ -515,7 +515,7 @@
this.level.addFreshEntity(entityitem);
}
}
@@ -1417,21 +1667,40 @@
@@ -1418,21 +1668,40 @@
boolean flag = this.lastHurtByPlayerTime > 0;
@@ -559,7 +559,7 @@
}
@@ -1504,6 +1773,28 @@
@@ -1517,6 +1786,28 @@
return itemstack.getEatingSound();
}
@@ -588,7 +588,7 @@
@Override
public void setOnGround(boolean flag) {
super.setOnGround(flag);
@@ -1559,9 +1850,14 @@
@@ -1572,9 +1863,14 @@
int i = this.calculateFallDamage(f, f1);
if (i > 0) {
@@ -604,7 +604,7 @@
return true;
} else {
return flag;
@@ -1610,7 +1906,7 @@
@@ -1623,7 +1919,7 @@
protected float getDamageAfterArmorAbsorb(DamageSource damagesource, float f) {
if (!damagesource.isBypassArmor()) {
@@ -613,7 +613,7 @@
f = CombatMath.getDamageAfterAbsorb(f, (float) this.getArmorValue(), (float) this.getAttributeValue(GenericAttributes.ARMOR_TOUGHNESS));
}
@@ -1623,7 +1919,8 @@
@@ -1636,7 +1932,8 @@
} else {
int i;
@@ -623,7 +623,7 @@
i = (this.getEffect(MobEffects.DAMAGE_RESISTANCE).getAmplifier() + 1) * 5;
int j = 25 - i;
float f1 = f * (float) j;
@@ -1656,29 +1953,172 @@
@@ -1669,29 +1966,172 @@
}
}
@@ -806,7 +806,7 @@
}
public CombatTracker getCombatTracker() {
@@ -1699,9 +2139,19 @@
@@ -1712,9 +2152,19 @@
}
public final void setArrowCount(int i) {
@@ -827,7 +827,7 @@
public final int getStingerCount() {
return (Integer) this.entityData.get(EntityLiving.DATA_STINGER_COUNT_ID);
}
@@ -1996,6 +2446,12 @@
@@ -2017,6 +2467,12 @@
public abstract ItemStack getItemBySlot(EnumItemSlot enumitemslot);
@@ -840,7 +840,7 @@
@Override
public abstract void setItemSlot(EnumItemSlot enumitemslot, ItemStack itemstack);
@@ -2239,6 +2695,7 @@
@@ -2256,6 +2712,7 @@
}
if (this.onGround && !this.level.isClientSide) {
@@ -848,7 +848,7 @@
this.setSharedFlag(7, false);
}
} else {
@@ -2772,6 +3229,7 @@
@@ -2793,6 +3250,7 @@
}
if (!this.level.isClientSide) {
@@ -856,7 +856,7 @@
this.setSharedFlag(7, flag);
}
@@ -2931,14 +3389,21 @@
@@ -2956,14 +3414,21 @@
@Override
public boolean isPickable() {
@@ -880,7 +880,7 @@
@Override
public float getYHeadRot() {
return this.yHeadRot;
@@ -3133,7 +3598,26 @@
@@ -3158,7 +3623,26 @@
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
this.triggerItemUseEffects(this.useItem, 16);
@@ -908,7 +908,7 @@
if (itemstack != this.useItem) {
this.setItemInHand(enumhand, itemstack);
@@ -3211,6 +3695,12 @@
@@ -3236,6 +3720,12 @@
}
public boolean randomTeleport(double d0, double d1, double d2, boolean flag) {
@@ -921,7 +921,7 @@
double d3 = this.getX();
double d4 = this.getY();
double d5 = this.getZ();
@@ -3235,16 +3725,41 @@
@@ -3260,16 +3750,41 @@
}
if (flag2) {
@@ -966,7 +966,7 @@
} else {
if (flag) {
world.broadcastEntityEvent(this, (byte) 46);
@@ -3254,7 +3769,7 @@
@@ -3279,7 +3794,7 @@
((EntityCreature) this).getNavigation().stop();
}
@@ -975,7 +975,7 @@
}
}
@@ -3337,7 +3852,7 @@
@@ -3357,7 +3872,7 @@
}
public void stopSleeping() {
@@ -984,7 +984,7 @@
World world = this.level;
java.util.Objects.requireNonNull(this.level);
@@ -3369,7 +3884,7 @@
@@ -3391,7 +3906,7 @@
@Nullable
public EnumDirection getBedOrientation() {
@@ -993,7 +993,7 @@
return blockposition != null ? BlockBed.getBedOrientation(this.level, blockposition) : null;
}
@@ -3417,7 +3932,7 @@
@@ -3439,7 +3954,7 @@
Pair<MobEffect, Float> pair = (Pair) iterator.next();
if (!world.isClientSide && pair.getFirst() != null && world.random.nextFloat() < (Float) pair.getSecond()) {