@@ -31,7 +31,7 @@
|
||||
public abstract class EntityLiving extends Entity implements Attackable {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
@@ -227,6 +251,20 @@
|
||||
@@ -226,6 +250,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);
|
||||
@@ -239,7 +277,9 @@
|
||||
@@ -238,7 +276,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();
|
||||
@@ -318,7 +358,13 @@
|
||||
@@ -317,7 +357,13 @@
|
||||
double d7 = Math.min((double) (0.2F + f / 15.0F), 2.5D);
|
||||
int i = (int) (150.0D * d7);
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
}
|
||||
|
||||
super.checkFallDamage(d0, flag, iblockdata, blockposition);
|
||||
@@ -673,13 +719,19 @@
|
||||
@@ -672,13 +718,19 @@
|
||||
}
|
||||
|
||||
public void onEquipItem(EnumItemSlot enumitemslot, ItemStack itemstack, ItemStack itemstack1) {
|
||||
@@ -99,7 +99,7 @@
|
||||
this.level().playSound((EntityHuman) null, this.getX(), this.getY(), this.getZ(), equipable.getEquipSound(), this.getSoundSource(), 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@@ -753,6 +805,17 @@
|
||||
@@ -752,6 +804,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
if (nbttagcompound.contains("Health", 99)) {
|
||||
this.setHealth(nbttagcompound.getFloat("Health"));
|
||||
}
|
||||
@@ -790,9 +853,32 @@
|
||||
@@ -789,9 +852,32 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
try {
|
||||
while (iterator.hasNext()) {
|
||||
MobEffectList mobeffectlist = (MobEffectList) iterator.next();
|
||||
@@ -802,6 +888,12 @@
|
||||
@@ -801,6 +887,12 @@
|
||||
this.onEffectUpdated(mobeffect, true, (Entity) null);
|
||||
})) {
|
||||
if (!this.level().isClientSide) {
|
||||
@@ -163,7 +163,7 @@
|
||||
iterator.remove();
|
||||
this.onEffectRemoved(mobeffect);
|
||||
}
|
||||
@@ -812,6 +904,17 @@
|
||||
@@ -811,6 +903,17 @@
|
||||
} catch (ConcurrentModificationException concurrentmodificationexception) {
|
||||
;
|
||||
}
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
if (this.effectsDirty) {
|
||||
if (!this.level().isClientSide) {
|
||||
@@ -938,7 +1041,13 @@
|
||||
@@ -937,7 +1040,13 @@
|
||||
this.entityData.set(EntityLiving.DATA_EFFECT_COLOR_ID, 0);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
if (this.level().isClientSide) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -947,7 +1056,14 @@
|
||||
@@ -946,7 +1055,14 @@
|
||||
boolean flag;
|
||||
|
||||
for (flag = false; iterator.hasNext(); flag = true) {
|
||||
@@ -211,7 +211,7 @@
|
||||
iterator.remove();
|
||||
}
|
||||
|
||||
@@ -976,19 +1092,49 @@
|
||||
@@ -975,19 +1091,49 @@
|
||||
return this.addEffect(mobeffect, (Entity) null);
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -1026,13 +1172,39 @@
|
||||
@@ -1025,13 +1171,39 @@
|
||||
return this.getMobType() == EnumMonsterType.UNDEAD;
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
|
||||
if (mobeffect != null) {
|
||||
this.onEffectRemoved(mobeffect);
|
||||
@@ -1130,20 +1302,55 @@
|
||||
@@ -1129,20 +1301,55 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -360,7 +360,7 @@
|
||||
this.entityData.set(EntityLiving.DATA_HEALTH_ID, MathHelper.clamp(f, 0.0F, this.getMaxHealth()));
|
||||
}
|
||||
|
||||
@@ -1157,7 +1364,7 @@
|
||||
@@ -1156,7 +1363,7 @@
|
||||
return false;
|
||||
} else if (this.level().isClientSide) {
|
||||
return false;
|
||||
@@ -369,7 +369,7 @@
|
||||
return false;
|
||||
} else if (damagesource.is(DamageTypeTags.IS_FIRE) && this.hasEffect(MobEffects.FIRE_RESISTANCE)) {
|
||||
return false;
|
||||
@@ -1168,10 +1375,11 @@
|
||||
@@ -1167,10 +1374,11 @@
|
||||
|
||||
this.noActionTime = 0;
|
||||
float f1 = f;
|
||||
@@ -383,7 +383,7 @@
|
||||
this.hurtCurrentlyUsedShield(f);
|
||||
f2 = f;
|
||||
f = 0.0F;
|
||||
@@ -1195,23 +1403,33 @@
|
||||
@@ -1194,23 +1402,33 @@
|
||||
this.walkAnimation.setSpeed(1.5F);
|
||||
boolean flag1 = true;
|
||||
|
||||
@@ -422,7 +422,7 @@
|
||||
this.hurtHelmet(damagesource, f);
|
||||
f *= 0.75F;
|
||||
}
|
||||
@@ -1329,19 +1547,32 @@
|
||||
@@ -1328,19 +1546,32 @@
|
||||
EnumHand[] aenumhand = EnumHand.values();
|
||||
int i = aenumhand.length;
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
EntityPlayer entityplayer = (EntityPlayer) this;
|
||||
|
||||
entityplayer.awardStat(StatisticList.ITEM_USED.get(Items.TOTEM_OF_UNDYING));
|
||||
@@ -1350,14 +1581,16 @@
|
||||
@@ -1349,14 +1580,16 @@
|
||||
}
|
||||
|
||||
this.setHealth(1.0F);
|
||||
@@ -481,7 +481,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1466,14 +1699,22 @@
|
||||
@@ -1463,14 +1696,22 @@
|
||||
IBlockData iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
|
||||
|
||||
if (this.level().getBlockState(blockposition).isAir() && iblockdata.canSurvive(this.level(), blockposition)) {
|
||||
@@ -506,7 +506,7 @@
|
||||
this.level().addFreshEntity(entityitem);
|
||||
}
|
||||
}
|
||||
@@ -1493,21 +1734,40 @@
|
||||
@@ -1490,21 +1731,40 @@
|
||||
|
||||
boolean flag = this.lastHurtByPlayerTime > 0;
|
||||
|
||||
@@ -550,7 +550,7 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -1599,6 +1859,28 @@
|
||||
@@ -1596,6 +1856,28 @@
|
||||
return itemstack.getEatingSound();
|
||||
}
|
||||
|
||||
@@ -579,7 +579,7 @@
|
||||
public Optional<BlockPosition> getLastClimbablePos() {
|
||||
return this.lastClimbablePos;
|
||||
}
|
||||
@@ -1645,9 +1927,14 @@
|
||||
@@ -1642,9 +1924,14 @@
|
||||
int i = this.calculateFallDamage(f, f1);
|
||||
|
||||
if (i > 0) {
|
||||
@@ -595,7 +595,7 @@
|
||||
return true;
|
||||
} else {
|
||||
return flag;
|
||||
@@ -1699,7 +1986,7 @@
|
||||
@@ -1696,7 +1983,7 @@
|
||||
|
||||
protected float getDamageAfterArmorAbsorb(DamageSource damagesource, float f) {
|
||||
if (!damagesource.is(DamageTypeTags.BYPASSES_ARMOR)) {
|
||||
@@ -604,7 +604,7 @@
|
||||
f = CombatMath.getDamageAfterAbsorb(f, (float) this.getArmorValue(), (float) this.getAttributeValue(GenericAttributes.ARMOR_TOUGHNESS));
|
||||
}
|
||||
|
||||
@@ -1712,7 +1999,8 @@
|
||||
@@ -1709,7 +1996,8 @@
|
||||
} else {
|
||||
int i;
|
||||
|
||||
@@ -614,7 +614,7 @@
|
||||
i = (this.getEffect(MobEffects.DAMAGE_RESISTANCE).getAmplifier() + 1) * 5;
|
||||
int j = 25 - i;
|
||||
float f1 = f * (float) j;
|
||||
@@ -1745,16 +2033,125 @@
|
||||
@@ -1742,16 +2030,125 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -748,7 +748,7 @@
|
||||
if (f2 > 0.0F && f2 < 3.4028235E37F) {
|
||||
Entity entity = damagesource.getEntity();
|
||||
|
||||
@@ -1765,13 +2162,47 @@
|
||||
@@ -1762,13 +2159,47 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -798,7 +798,7 @@
|
||||
}
|
||||
|
||||
public CombatTracker getCombatTracker() {
|
||||
@@ -1796,8 +2227,18 @@
|
||||
@@ -1793,8 +2224,18 @@
|
||||
}
|
||||
|
||||
public final void setArrowCount(int i) {
|
||||
@@ -818,7 +818,7 @@
|
||||
|
||||
public final int getStingerCount() {
|
||||
return (Integer) this.entityData.get(EntityLiving.DATA_STINGER_COUNT_ID);
|
||||
@@ -2039,6 +2480,12 @@
|
||||
@@ -2036,6 +2477,12 @@
|
||||
|
||||
public abstract ItemStack getItemBySlot(EnumItemSlot enumitemslot);
|
||||
|
||||
@@ -831,7 +831,7 @@
|
||||
@Override
|
||||
public abstract void setItemSlot(EnumItemSlot enumitemslot, ItemStack itemstack);
|
||||
|
||||
@@ -2273,6 +2720,7 @@
|
||||
@@ -2270,6 +2717,7 @@
|
||||
}
|
||||
|
||||
if (this.onGround() && !this.level().isClientSide) {
|
||||
@@ -839,7 +839,7 @@
|
||||
this.setSharedFlag(7, false);
|
||||
}
|
||||
} else {
|
||||
@@ -2443,7 +2891,7 @@
|
||||
@@ -2440,7 +2888,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -848,7 +848,7 @@
|
||||
if (this.tickCount % 20 == 0) {
|
||||
this.getCombatTracker().recheckStatus();
|
||||
}
|
||||
@@ -2540,7 +2988,7 @@
|
||||
@@ -2537,7 +2985,7 @@
|
||||
this.refreshDirtyAttributes();
|
||||
}
|
||||
|
||||
@@ -857,7 +857,7 @@
|
||||
Map<EnumItemSlot, ItemStack> map = this.collectEquipmentChanges();
|
||||
|
||||
if (map != null) {
|
||||
@@ -2837,6 +3285,7 @@
|
||||
@@ -2839,6 +3287,7 @@
|
||||
}
|
||||
|
||||
if (!this.level().isClientSide) {
|
||||
@@ -865,7 +865,7 @@
|
||||
this.setSharedFlag(7, flag);
|
||||
}
|
||||
|
||||
@@ -3027,13 +3476,20 @@
|
||||
@@ -3029,13 +3478,20 @@
|
||||
|
||||
@Override
|
||||
public boolean isPickable() {
|
||||
@@ -888,7 +888,7 @@
|
||||
|
||||
@Override
|
||||
public float getYHeadRot() {
|
||||
@@ -3229,7 +3685,26 @@
|
||||
@@ -3231,7 +3687,26 @@
|
||||
} else {
|
||||
if (!this.useItem.isEmpty() && this.isUsingItem()) {
|
||||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
@@ -916,7 +916,7 @@
|
||||
|
||||
if (itemstack != this.useItem) {
|
||||
this.setItemInHand(enumhand, itemstack);
|
||||
@@ -3307,6 +3782,12 @@
|
||||
@@ -3309,6 +3784,12 @@
|
||||
}
|
||||
|
||||
public boolean randomTeleport(double d0, double d1, double d2, boolean flag) {
|
||||
@@ -929,7 +929,7 @@
|
||||
double d3 = this.getX();
|
||||
double d4 = this.getY();
|
||||
double d5 = this.getZ();
|
||||
@@ -3331,16 +3812,41 @@
|
||||
@@ -3333,16 +3814,41 @@
|
||||
}
|
||||
|
||||
if (flag2) {
|
||||
@@ -974,8 +974,8 @@
|
||||
} else {
|
||||
if (flag) {
|
||||
world.broadcastEntityEvent(this, (byte) 46);
|
||||
@@ -3350,7 +3856,7 @@
|
||||
((EntityCreature) this).getNavigation().stop();
|
||||
@@ -3354,7 +3860,7 @@
|
||||
entitycreature.getNavigation().stop();
|
||||
}
|
||||
|
||||
- return true;
|
||||
@@ -983,7 +983,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3439,7 +3945,7 @@
|
||||
@@ -3443,7 +3949,7 @@
|
||||
}
|
||||
|
||||
public void stopSleeping() {
|
||||
@@ -992,7 +992,7 @@
|
||||
World world = this.level();
|
||||
|
||||
java.util.Objects.requireNonNull(world);
|
||||
@@ -3473,7 +3979,7 @@
|
||||
@@ -3477,7 +3983,7 @@
|
||||
|
||||
@Nullable
|
||||
public EnumDirection getBedOrientation() {
|
||||
@@ -1001,7 +1001,7 @@
|
||||
|
||||
return blockposition != null ? BlockBed.getBedOrientation(this.level(), blockposition) : null;
|
||||
}
|
||||
@@ -3521,7 +4027,7 @@
|
||||
@@ -3525,7 +4031,7 @@
|
||||
Pair<MobEffect, Float> pair = (Pair) iterator.next();
|
||||
|
||||
if (!world.isClientSide && pair.getFirst() != null && world.random.nextFloat() < (Float) pair.getSecond()) {
|
||||
|
||||
Reference in New Issue
Block a user