@@ -200,7 +200,7 @@
|
||||
this.setYRot(f % 360.0F);
|
||||
this.setXRot(f1 % 360.0F);
|
||||
}
|
||||
@@ -458,6 +597,15 @@
|
||||
@@ -462,6 +601,15 @@
|
||||
this.baseTick();
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
public void baseTick() {
|
||||
GameProfilerFiller gameprofilerfiller = Profiler.get();
|
||||
|
||||
@@ -471,7 +619,7 @@
|
||||
@@ -475,7 +623,7 @@
|
||||
--this.boardingCooldown;
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@
|
||||
if (this.canSpawnSprintParticle()) {
|
||||
this.spawnSprintParticle();
|
||||
}
|
||||
@@ -510,6 +658,10 @@
|
||||
@@ -514,6 +662,10 @@
|
||||
if (this.isInLava()) {
|
||||
this.lavaHurt();
|
||||
this.fallDistance *= 0.5F;
|
||||
@@ -236,7 +236,7 @@
|
||||
}
|
||||
|
||||
this.checkBelowWorld();
|
||||
@@ -521,7 +673,7 @@
|
||||
@@ -525,7 +677,7 @@
|
||||
world = this.level();
|
||||
if (world instanceof WorldServer worldserver) {
|
||||
if (this instanceof Leashable) {
|
||||
@@ -245,7 +245,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -564,15 +716,32 @@
|
||||
@@ -568,15 +720,32 @@
|
||||
|
||||
public void lavaHurt() {
|
||||
if (!this.fireImmune()) {
|
||||
@@ -280,7 +280,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -583,6 +752,22 @@
|
||||
@@ -587,6 +756,22 @@
|
||||
}
|
||||
|
||||
public final void igniteForSeconds(float f) {
|
||||
@@ -303,7 +303,7 @@
|
||||
this.igniteForTicks(MathHelper.floor(f * 20.0F));
|
||||
}
|
||||
|
||||
@@ -606,7 +791,7 @@
|
||||
@@ -610,7 +795,7 @@
|
||||
}
|
||||
|
||||
protected void onBelowWorld() {
|
||||
@@ -312,7 +312,7 @@
|
||||
}
|
||||
|
||||
public boolean isFree(double d0, double d1, double d2) {
|
||||
@@ -739,6 +924,28 @@
|
||||
@@ -750,6 +935,28 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
if (!this.level().isClientSide() || this.isControlledByLocalInstance()) {
|
||||
Entity.MovementEmission entity_movementemission = this.getMovementEmission();
|
||||
|
||||
@@ -1120,6 +1327,20 @@
|
||||
@@ -1133,6 +1340,20 @@
|
||||
return SoundEffects.GENERIC_SPLASH;
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@
|
||||
public void recordMovementThroughBlocks(Vec3D vec3d, Vec3D vec3d1) {
|
||||
this.movementThisTick.add(new Entity.b(vec3d, vec3d1));
|
||||
}
|
||||
@@ -1586,6 +1807,7 @@
|
||||
@@ -1609,6 +1830,7 @@
|
||||
this.yo = d1;
|
||||
this.zo = d4;
|
||||
this.setPos(d3, d1, d4);
|
||||
@@ -370,7 +370,7 @@
|
||||
}
|
||||
|
||||
public void moveTo(Vec3D vec3d) {
|
||||
@@ -1838,6 +2060,12 @@
|
||||
@@ -1861,6 +2083,12 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -380,10 +380,10 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public void awardKillScore(Entity entity, int i, DamageSource damagesource) {
|
||||
public void awardKillScore(Entity entity, DamageSource damagesource) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
CriterionTriggers.ENTITY_KILLED_PLAYER.trigger((EntityPlayer) entity, this, damagesource);
|
||||
@@ -1866,16 +2094,22 @@
|
||||
@@ -1889,16 +2117,22 @@
|
||||
}
|
||||
|
||||
public boolean saveAsPassenger(NBTTagCompound nbttagcompound) {
|
||||
@@ -408,7 +408,7 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1886,16 +2120,38 @@
|
||||
@@ -1909,16 +2143,38 @@
|
||||
}
|
||||
|
||||
public NBTTagCompound saveWithoutId(NBTTagCompound nbttagcompound) {
|
||||
@@ -451,7 +451,7 @@
|
||||
nbttagcompound.put("Rotation", this.newFloatList(this.getYRot(), this.getXRot()));
|
||||
nbttagcompound.putFloat("FallDistance", this.fallDistance);
|
||||
nbttagcompound.putShort("Fire", (short) this.remainingFireTicks);
|
||||
@@ -1903,7 +2159,28 @@
|
||||
@@ -1926,7 +2182,28 @@
|
||||
nbttagcompound.putBoolean("OnGround", this.onGround());
|
||||
nbttagcompound.putBoolean("Invulnerable", this.invulnerable);
|
||||
nbttagcompound.putInt("PortalCooldown", this.portalCooldown);
|
||||
@@ -481,7 +481,7 @@
|
||||
IChatBaseComponent ichatbasecomponent = this.getCustomName();
|
||||
|
||||
if (ichatbasecomponent != null) {
|
||||
@@ -1952,7 +2229,7 @@
|
||||
@@ -1975,7 +2252,7 @@
|
||||
nbttagcompound.put("Tags", nbttaglist);
|
||||
}
|
||||
|
||||
@@ -490,7 +490,7 @@
|
||||
if (this.isVehicle()) {
|
||||
nbttaglist = new NBTTagList();
|
||||
iterator = this.getPassengers().iterator();
|
||||
@@ -1961,7 +2238,7 @@
|
||||
@@ -1984,7 +2261,7 @@
|
||||
Entity entity = (Entity) iterator.next();
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
nbttaglist.add(nbttagcompound1);
|
||||
}
|
||||
}
|
||||
@@ -1971,6 +2248,11 @@
|
||||
@@ -1994,6 +2271,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -511,7 +511,7 @@
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
|
||||
@@ -2055,6 +2337,45 @@
|
||||
@@ -2080,6 +2362,45 @@
|
||||
} else {
|
||||
throw new IllegalStateException("Entity has invalid position");
|
||||
}
|
||||
@@ -557,7 +557,7 @@
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
|
||||
@@ -2076,6 +2397,12 @@
|
||||
@@ -2101,6 +2422,12 @@
|
||||
return entitytypes.canSerialize() && minecraftkey != null ? minecraftkey.toString() : null;
|
||||
}
|
||||
|
||||
@@ -570,7 +570,7 @@
|
||||
protected abstract void readAdditionalSaveData(NBTTagCompound nbttagcompound);
|
||||
|
||||
protected abstract void addAdditionalSaveData(NBTTagCompound nbttagcompound);
|
||||
@@ -2128,9 +2455,22 @@
|
||||
@@ -2153,9 +2480,22 @@
|
||||
if (itemstack.isEmpty()) {
|
||||
return null;
|
||||
} else {
|
||||
@@ -593,7 +593,7 @@
|
||||
worldserver.addFreshEntity(entityitem);
|
||||
return entityitem;
|
||||
}
|
||||
@@ -2159,6 +2499,12 @@
|
||||
@@ -2184,6 +2524,12 @@
|
||||
if (this.isAlive() && this instanceof Leashable leashable) {
|
||||
if (leashable.getLeashHolder() == entityhuman) {
|
||||
if (!this.level().isClientSide()) {
|
||||
@@ -603,10 +603,10 @@
|
||||
+ return EnumInteractionResult.PASS;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
leashable.dropLeash(true, !entityhuman.hasInfiniteMaterials());
|
||||
this.gameEvent(GameEvent.ENTITY_INTERACT, entityhuman);
|
||||
}
|
||||
@@ -2170,6 +2516,13 @@
|
||||
if (entityhuman.hasInfiniteMaterials()) {
|
||||
leashable.removeLeash();
|
||||
} else {
|
||||
@@ -2200,6 +2546,13 @@
|
||||
|
||||
if (itemstack.is(Items.LEAD) && leashable.canHaveALeashAttachedToIt()) {
|
||||
if (!this.level().isClientSide()) {
|
||||
@@ -620,7 +620,7 @@
|
||||
leashable.setLeashedTo(entityhuman, true);
|
||||
}
|
||||
|
||||
@@ -2243,7 +2596,7 @@
|
||||
@@ -2273,7 +2626,7 @@
|
||||
return false;
|
||||
} else if (!entity.couldAcceptPassenger()) {
|
||||
return false;
|
||||
@@ -629,7 +629,7 @@
|
||||
return false;
|
||||
} else {
|
||||
for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) {
|
||||
@@ -2255,6 +2608,27 @@
|
||||
@@ -2285,6 +2638,27 @@
|
||||
if (!flag && (!this.canRide(entity) || !entity.canAddPassenger(this))) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -657,7 +657,7 @@
|
||||
if (this.isPassenger()) {
|
||||
this.stopRiding();
|
||||
}
|
||||
@@ -2288,7 +2662,7 @@
|
||||
@@ -2318,7 +2692,7 @@
|
||||
Entity entity = this.vehicle;
|
||||
|
||||
this.vehicle = null;
|
||||
@@ -666,7 +666,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2319,10 +2693,38 @@
|
||||
@@ -2349,10 +2723,38 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -706,7 +706,7 @@
|
||||
if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
|
||||
this.passengers = ImmutableList.of();
|
||||
} else {
|
||||
@@ -2334,6 +2736,7 @@
|
||||
@@ -2364,6 +2766,7 @@
|
||||
entity.boardingCooldown = 60;
|
||||
this.gameEvent(GameEvent.ENTITY_DISMOUNT, entity);
|
||||
}
|
||||
@@ -714,7 +714,7 @@
|
||||
}
|
||||
|
||||
protected boolean canAddPassenger(Entity entity) {
|
||||
@@ -2434,7 +2837,7 @@
|
||||
@@ -2464,7 +2867,7 @@
|
||||
if (teleporttransition != null) {
|
||||
WorldServer worldserver1 = teleporttransition.newLevel();
|
||||
|
||||
@@ -723,7 +723,7 @@
|
||||
this.teleport(teleporttransition);
|
||||
}
|
||||
}
|
||||
@@ -2541,6 +2944,13 @@
|
||||
@@ -2571,6 +2974,13 @@
|
||||
}
|
||||
|
||||
public void setSwimming(boolean flag) {
|
||||
@@ -737,7 +737,7 @@
|
||||
this.setSharedFlag(4, flag);
|
||||
}
|
||||
|
||||
@@ -2594,8 +3004,12 @@
|
||||
@@ -2624,8 +3034,12 @@
|
||||
return this.getTeam() != null ? this.getTeam().isAlliedTo(scoreboardteambase) : false;
|
||||
}
|
||||
|
||||
@@ -751,7 +751,7 @@
|
||||
}
|
||||
|
||||
public boolean getSharedFlag(int i) {
|
||||
@@ -2614,7 +3028,7 @@
|
||||
@@ -2644,7 +3058,7 @@
|
||||
}
|
||||
|
||||
public int getMaxAirSupply() {
|
||||
@@ -760,7 +760,7 @@
|
||||
}
|
||||
|
||||
public int getAirSupply() {
|
||||
@@ -2622,7 +3036,18 @@
|
||||
@@ -2652,7 +3066,18 @@
|
||||
}
|
||||
|
||||
public void setAirSupply(int i) {
|
||||
@@ -780,7 +780,7 @@
|
||||
}
|
||||
|
||||
public int getTicksFrozen() {
|
||||
@@ -2649,11 +3074,40 @@
|
||||
@@ -2679,11 +3104,40 @@
|
||||
|
||||
public void thunderHit(WorldServer worldserver, EntityLightning entitylightning) {
|
||||
this.setRemainingFireTicks(this.remainingFireTicks + 1);
|
||||
@@ -823,7 +823,7 @@
|
||||
}
|
||||
|
||||
public void onAboveBubbleCol(boolean flag) {
|
||||
@@ -2822,6 +3276,18 @@
|
||||
@@ -2852,6 +3306,18 @@
|
||||
|
||||
if (world instanceof WorldServer worldserver) {
|
||||
if (!this.isRemoved()) {
|
||||
@@ -842,7 +842,7 @@
|
||||
WorldServer worldserver1 = teleporttransition.newLevel();
|
||||
boolean flag = worldserver1.dimension() != worldserver.dimension();
|
||||
|
||||
@@ -2890,8 +3356,12 @@
|
||||
@@ -2920,8 +3386,12 @@
|
||||
} else {
|
||||
entity.restoreFrom(this);
|
||||
this.removeAfterChangingDimensions();
|
||||
@@ -856,7 +856,7 @@
|
||||
Iterator iterator1 = list1.iterator();
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
@@ -2965,8 +3435,9 @@
|
||||
@@ -2995,8 +3465,9 @@
|
||||
}
|
||||
|
||||
protected void removeAfterChangingDimensions() {
|
||||
@@ -864,10 +864,10 @@
|
||||
+ this.setRemoved(Entity.RemovalReason.CHANGED_DIMENSION, null); // CraftBukkit - add Bukkit remove cause
|
||||
if (this instanceof Leashable leashable) {
|
||||
+ this.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit
|
||||
leashable.dropLeash(true, false);
|
||||
leashable.removeLeash();
|
||||
}
|
||||
|
||||
@@ -2976,6 +3447,20 @@
|
||||
@@ -3006,6 +3477,20 @@
|
||||
return BlockPortalShape.getRelativePosition(blockutil_rectangle, enumdirection_enumaxis, this.position(), this.getDimensions(this.getPose()));
|
||||
}
|
||||
|
||||
@@ -888,7 +888,7 @@
|
||||
public boolean canUsePortal(boolean flag) {
|
||||
return (flag || !this.isPassenger()) && this.isAlive();
|
||||
}
|
||||
@@ -3104,9 +3589,15 @@
|
||||
@@ -3134,9 +3619,15 @@
|
||||
return (Boolean) this.entityData.get(Entity.DATA_CUSTOM_NAME_VISIBLE);
|
||||
}
|
||||
|
||||
@@ -906,7 +906,7 @@
|
||||
|
||||
return entity != null;
|
||||
}
|
||||
@@ -3228,7 +3719,26 @@
|
||||
@@ -3258,7 +3749,26 @@
|
||||
}
|
||||
|
||||
public final void setBoundingBox(AxisAlignedBB axisalignedbb) {
|
||||
@@ -934,7 +934,7 @@
|
||||
}
|
||||
|
||||
public final float getEyeHeight(EntityPose entitypose) {
|
||||
@@ -3463,8 +3973,37 @@
|
||||
@@ -3489,8 +3999,37 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -973,7 +973,7 @@
|
||||
}
|
||||
|
||||
public void lookAt(ArgumentAnchor.Anchor argumentanchor_anchor, Vec3D vec3d) {
|
||||
@@ -3525,6 +4064,11 @@
|
||||
@@ -3551,6 +4090,11 @@
|
||||
vec3d = vec3d.add(vec3d1);
|
||||
++k1;
|
||||
}
|
||||
@@ -985,7 +985,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3792,6 +4336,14 @@
|
||||
@@ -3818,6 +4362,14 @@
|
||||
|
||||
@Override
|
||||
public final void setRemoved(Entity.RemovalReason entity_removalreason) {
|
||||
|
||||
Reference in New Issue
Block a user