mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 20:53:54 -07:00
@@ -25,7 +25,7 @@
|
||||
public abstract class EntityLiving extends Entity {
|
||||
|
||||
private static final Logger a = LogManager.getLogger();
|
||||
@@ -88,6 +106,15 @@
|
||||
@@ -88,6 +106,20 @@
|
||||
private BlockPosition bF;
|
||||
private DamageSource bG;
|
||||
private long bH;
|
||||
@@ -37,11 +37,16 @@
|
||||
+ public org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes;
|
||||
+ public boolean collides = true;
|
||||
+ public boolean canPickUpLoot;
|
||||
+
|
||||
+ @Override
|
||||
+ public float getBukkitYaw() {
|
||||
+ return getHeadRotation();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
public void killEntity() {
|
||||
this.damageEntity(DamageSource.OUT_OF_WORLD, Float.MAX_VALUE);
|
||||
@@ -102,7 +129,8 @@
|
||||
@@ -102,7 +134,8 @@
|
||||
this.updateEffects = true;
|
||||
this.activeItem = ItemStack.a;
|
||||
this.initAttributes();
|
||||
@@ -51,7 +56,7 @@
|
||||
this.i = true;
|
||||
this.aM = (float) ((Math.random() + 1.0D) * 0.009999999776482582D);
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
@@ -140,7 +168,13 @@
|
||||
@@ -140,7 +173,13 @@
|
||||
double d1 = Math.min((double) (0.2F + f / 15.0F), 2.5D);
|
||||
int i = (int) (150.0D * d1);
|
||||
|
||||
@@ -66,7 +71,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,7 +236,11 @@
|
||||
@@ -202,7 +241,11 @@
|
||||
this.stopRiding();
|
||||
}
|
||||
} else {
|
||||
@@ -79,7 +84,7 @@
|
||||
}
|
||||
|
||||
if (!this.world.isClientSide) {
|
||||
@@ -259,6 +297,18 @@
|
||||
@@ -259,6 +302,18 @@
|
||||
this.world.methodProfiler.b();
|
||||
}
|
||||
|
||||
@@ -98,7 +103,7 @@
|
||||
protected void b(BlockPosition blockposition) {
|
||||
int i = EnchantmentManager.a(Enchantments.j, this);
|
||||
|
||||
@@ -274,19 +324,19 @@
|
||||
@@ -274,19 +329,19 @@
|
||||
|
||||
protected void bO() {
|
||||
++this.deathTicks;
|
||||
@@ -127,7 +132,7 @@
|
||||
|
||||
this.die();
|
||||
|
||||
@@ -442,6 +492,17 @@
|
||||
@@ -442,6 +497,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +150,7 @@
|
||||
if (nbttagcompound.hasKeyOfType("Health", 99)) {
|
||||
this.setHealth(nbttagcompound.getFloat("Health"));
|
||||
}
|
||||
@@ -464,9 +525,15 @@
|
||||
@@ -464,9 +530,15 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -161,7 +166,7 @@
|
||||
try {
|
||||
while (iterator.hasNext()) {
|
||||
MobEffectList mobeffectlist = (MobEffectList) iterator.next();
|
||||
@@ -484,6 +551,17 @@
|
||||
@@ -484,6 +556,17 @@
|
||||
} catch (ConcurrentModificationException concurrentmodificationexception) {
|
||||
;
|
||||
}
|
||||
@@ -179,7 +184,7 @@
|
||||
|
||||
if (this.updateEffects) {
|
||||
if (!this.world.isClientSide) {
|
||||
@@ -585,6 +663,12 @@
|
||||
@@ -585,6 +668,12 @@
|
||||
}
|
||||
|
||||
public void addEffect(MobEffect mobeffect) {
|
||||
@@ -192,7 +197,7 @@
|
||||
if (this.d(mobeffect)) {
|
||||
MobEffect mobeffect1 = (MobEffect) this.effects.get(mobeffect.getMobEffect());
|
||||
|
||||
@@ -617,6 +701,12 @@
|
||||
@@ -617,6 +706,12 @@
|
||||
|
||||
@Nullable
|
||||
public MobEffect c(@Nullable MobEffectList mobeffectlist) {
|
||||
@@ -205,7 +210,7 @@
|
||||
return (MobEffect) this.effects.remove(mobeffectlist);
|
||||
}
|
||||
|
||||
@@ -656,20 +746,52 @@
|
||||
@@ -656,20 +751,52 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -259,7 +264,7 @@
|
||||
this.datawatcher.set(EntityLiving.HEALTH, Float.valueOf(MathHelper.a(f, 0.0F, this.getMaxHealth())));
|
||||
}
|
||||
|
||||
@@ -687,14 +809,16 @@
|
||||
@@ -687,14 +814,16 @@
|
||||
} else {
|
||||
float f1 = f;
|
||||
|
||||
@@ -279,7 +284,7 @@
|
||||
this.damageShield(f);
|
||||
f = 0.0F;
|
||||
if (!damagesource.a()) {
|
||||
@@ -713,20 +837,39 @@
|
||||
@@ -713,20 +842,39 @@
|
||||
|
||||
if ((float) this.noDamageTicks > (float) this.maxNoDamageTicks / 2.0F) {
|
||||
if (f <= this.lastDamage) {
|
||||
@@ -321,7 +326,7 @@
|
||||
this.aA = 0.0F;
|
||||
Entity entity1 = damagesource.getEntity();
|
||||
|
||||
@@ -833,18 +976,26 @@
|
||||
@@ -833,18 +981,26 @@
|
||||
EnumHand[] aenumhand = EnumHand.values();
|
||||
int i = aenumhand.length;
|
||||
|
||||
@@ -351,7 +356,7 @@
|
||||
if (this instanceof EntityPlayer) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) this;
|
||||
|
||||
@@ -859,7 +1010,7 @@
|
||||
@@ -859,7 +1015,7 @@
|
||||
this.world.broadcastEntityEffect(this, (byte) 35);
|
||||
}
|
||||
|
||||
@@ -360,7 +365,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -944,6 +1095,12 @@
|
||||
@@ -944,6 +1100,12 @@
|
||||
boolean flag = this.lastDamageByPlayerTime > 0;
|
||||
|
||||
this.a(flag, i, damagesource);
|
||||
@@ -373,7 +378,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1033,8 +1190,13 @@
|
||||
@@ -1033,8 +1195,13 @@
|
||||
int i = MathHelper.f((f - 3.0F - f2) * f1);
|
||||
|
||||
if (i > 0) {
|
||||
@@ -388,7 +393,7 @@
|
||||
int j = MathHelper.floor(this.locX);
|
||||
int k = MathHelper.floor(this.locY - 0.20000000298023224D);
|
||||
int l = MathHelper.floor(this.locZ);
|
||||
@@ -1061,7 +1223,7 @@
|
||||
@@ -1061,7 +1228,7 @@
|
||||
|
||||
protected float applyArmorModifier(DamageSource damagesource, float f) {
|
||||
if (!damagesource.ignoresArmor()) {
|
||||
@@ -397,7 +402,7 @@
|
||||
f = CombatMath.a(f, (float) this.getArmorStrength(), (float) this.getAttributeInstance(GenericAttributes.i).getValue());
|
||||
}
|
||||
|
||||
@@ -1074,7 +1236,8 @@
|
||||
@@ -1074,7 +1241,8 @@
|
||||
} else {
|
||||
int i;
|
||||
|
||||
@@ -407,7 +412,7 @@
|
||||
i = (this.getEffect(MobEffects.RESISTANCE).getAmplifier() + 1) * 5;
|
||||
int j = 25 - i;
|
||||
float f1 = f * (float) j;
|
||||
@@ -1095,22 +1258,142 @@
|
||||
@@ -1095,22 +1263,142 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,7 +565,7 @@
|
||||
}
|
||||
|
||||
public CombatTracker getCombatTracker() {
|
||||
@@ -1177,6 +1460,7 @@
|
||||
@@ -1177,6 +1465,7 @@
|
||||
public AttributeMapBase getAttributeMap() {
|
||||
if (this.attributeMap == null) {
|
||||
this.attributeMap = new AttributeMapServer();
|
||||
@@ -568,7 +573,7 @@
|
||||
}
|
||||
|
||||
return this.attributeMap;
|
||||
@@ -1469,6 +1753,7 @@
|
||||
@@ -1469,6 +1758,7 @@
|
||||
}
|
||||
|
||||
if (this.onGround && !this.world.isClientSide) {
|
||||
@@ -576,7 +581,7 @@
|
||||
this.setFlag(7, false);
|
||||
}
|
||||
} else {
|
||||
@@ -1838,6 +2123,7 @@
|
||||
@@ -1838,6 +2128,7 @@
|
||||
}
|
||||
|
||||
if (!this.world.isClientSide) {
|
||||
@@ -584,7 +589,7 @@
|
||||
this.setFlag(7, flag);
|
||||
}
|
||||
|
||||
@@ -1931,11 +2217,11 @@
|
||||
@@ -1931,11 +2222,11 @@
|
||||
}
|
||||
|
||||
public boolean isInteractable() {
|
||||
@@ -598,7 +603,7 @@
|
||||
}
|
||||
|
||||
protected void ax() {
|
||||
@@ -2072,7 +2358,27 @@
|
||||
@@ -2072,7 +2363,27 @@
|
||||
protected void v() {
|
||||
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
|
||||
this.b(this.activeItem, 16);
|
||||
@@ -627,7 +632,7 @@
|
||||
this.cN();
|
||||
}
|
||||
|
||||
@@ -2151,10 +2457,18 @@
|
||||
@@ -2151,10 +2462,18 @@
|
||||
}
|
||||
|
||||
if (flag1) {
|
||||
|
Reference in New Issue
Block a user