@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/Entity.java
|
||||
+++ b/net/minecraft/server/Entity.java
|
||||
@@ -21,8 +21,54 @@
|
||||
@@ -20,8 +20,54 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
protected static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final AtomicInteger entityCount = new AtomicInteger();
|
||||
private static final List<ItemStack> c = Collections.emptyList();
|
||||
@@ -107,6 +153,16 @@
|
||||
@@ -106,6 +152,16 @@
|
||||
private long aH;
|
||||
private EntitySize size;
|
||||
private float headHeight;
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
public Entity(EntityTypes<?> entitytypes, World world) {
|
||||
this.id = Entity.entityCount.incrementAndGet();
|
||||
@@ -213,6 +269,33 @@
|
||||
@@ -212,6 +268,33 @@
|
||||
}
|
||||
|
||||
protected void setYawPitch(float f, float f1) {
|
||||
@@ -106,7 +106,7 @@
|
||||
this.yaw = f % 360.0F;
|
||||
this.pitch = f1 % 360.0F;
|
||||
}
|
||||
@@ -225,6 +308,7 @@
|
||||
@@ -224,6 +307,7 @@
|
||||
float f1 = this.size.height;
|
||||
|
||||
this.a(new AxisAlignedBB(d0 - (double) f, d1, d2 - (double) f, d0 + (double) f, d1 + (double) f1, d2 + (double) f));
|
||||
@@ -114,7 +114,7 @@
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
@@ -235,6 +319,15 @@
|
||||
@@ -234,6 +318,15 @@
|
||||
this.entityBaseTick();
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
public void entityBaseTick() {
|
||||
this.world.getMethodProfiler().enter("entityBaseTick");
|
||||
if (this.isPassenger() && this.getVehicle().dead) {
|
||||
@@ -251,7 +344,7 @@
|
||||
@@ -250,7 +343,7 @@
|
||||
this.lastZ = this.locZ;
|
||||
this.lastPitch = this.pitch;
|
||||
this.lastYaw = this.yaw;
|
||||
@@ -139,7 +139,7 @@
|
||||
this.az();
|
||||
this.m();
|
||||
if (this.world.isClientSide) {
|
||||
@@ -301,12 +394,44 @@
|
||||
@@ -300,12 +393,44 @@
|
||||
|
||||
protected void burnFromLava() {
|
||||
if (!this.isFireProof()) {
|
||||
@@ -185,7 +185,7 @@
|
||||
int j = i * 20;
|
||||
|
||||
if (this instanceof EntityLiving) {
|
||||
@@ -402,6 +527,28 @@
|
||||
@@ -401,6 +526,28 @@
|
||||
block1.a((IBlockAccess) this.world, this);
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
if (this.playStepSound() && (!this.onGround || !this.isSneaking() || !(this instanceof EntityHuman)) && !this.isPassenger()) {
|
||||
double d0 = vec3d1.x;
|
||||
double d1 = vec3d1.y;
|
||||
@@ -455,7 +602,14 @@
|
||||
@@ -454,7 +601,14 @@
|
||||
if (!flag) {
|
||||
++this.fireTicks;
|
||||
if (this.fireTicks == 0) {
|
||||
@@ -230,7 +230,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,7 +720,7 @@
|
||||
@@ -565,7 +719,7 @@
|
||||
VoxelShape voxelshape = this.world.getWorldBorder().a();
|
||||
Stream<VoxelShape> stream = VoxelShapes.c(voxelshape, VoxelShapes.a(axisalignedbb.shrink(1.0E-7D)), OperatorBoolean.AND) ? Stream.empty() : Stream.of(voxelshape);
|
||||
AxisAlignedBB axisalignedbb1 = axisalignedbb.a(vec3d).g(1.0E-7D);
|
||||
@@ -239,7 +239,7 @@
|
||||
return !this.x(entity);
|
||||
}).flatMap((entity) -> {
|
||||
return Stream.of(entity.ap(), this.j(entity));
|
||||
@@ -650,6 +804,7 @@
|
||||
@@ -649,6 +803,7 @@
|
||||
this.locX = (axisalignedbb.minX + axisalignedbb.maxX) / 2.0D;
|
||||
this.locY = axisalignedbb.minY;
|
||||
this.locZ = (axisalignedbb.minZ + axisalignedbb.maxZ) / 2.0D;
|
||||
@@ -247,7 +247,7 @@
|
||||
}
|
||||
|
||||
protected SoundEffect getSoundSwim() {
|
||||
@@ -821,7 +976,7 @@
|
||||
@@ -820,7 +975,7 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
if (!this.isFireProof()) {
|
||||
this.damageEntity(DamageSource.FIRE, (float) i);
|
||||
}
|
||||
@@ -1054,6 +1209,13 @@
|
||||
@@ -1053,6 +1208,13 @@
|
||||
}
|
||||
|
||||
public void spawnIn(World world) {
|
||||
@@ -270,7 +270,7 @@
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
@@ -1079,6 +1241,7 @@
|
||||
@@ -1078,6 +1240,7 @@
|
||||
this.lastYaw -= 360.0F;
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
this.setYawPitch(f, f1);
|
||||
}
|
||||
@@ -1247,7 +1410,7 @@
|
||||
@@ -1246,7 +1409,7 @@
|
||||
public boolean c(NBTTagCompound nbttagcompound) {
|
||||
String s = this.getSaveID();
|
||||
|
||||
@@ -287,7 +287,7 @@
|
||||
nbttagcompound.setString("id", s);
|
||||
this.save(nbttagcompound);
|
||||
return true;
|
||||
@@ -1266,6 +1429,18 @@
|
||||
@@ -1265,6 +1428,18 @@
|
||||
Vec3D vec3d = this.getMot();
|
||||
|
||||
nbttagcompound.set("Motion", this.a(vec3d.x, vec3d.y, vec3d.z));
|
||||
@@ -306,7 +306,7 @@
|
||||
nbttagcompound.set("Rotation", this.a(this.yaw, this.pitch));
|
||||
nbttagcompound.setFloat("FallDistance", this.fallDistance);
|
||||
nbttagcompound.setShort("Fire", (short) this.fireTicks);
|
||||
@@ -1275,6 +1450,12 @@
|
||||
@@ -1274,6 +1449,12 @@
|
||||
nbttagcompound.setBoolean("Invulnerable", this.invulnerable);
|
||||
nbttagcompound.setInt("PortalCooldown", this.portalCooldown);
|
||||
nbttagcompound.a("UUID", this.getUniqueID());
|
||||
@@ -319,7 +319,7 @@
|
||||
IChatBaseComponent ichatbasecomponent = this.getCustomName();
|
||||
|
||||
if (ichatbasecomponent != null) {
|
||||
@@ -1415,6 +1596,42 @@
|
||||
@@ -1414,6 +1595,42 @@
|
||||
} else {
|
||||
throw new IllegalStateException("Entity has invalid position");
|
||||
}
|
||||
@@ -362,7 +362,7 @@
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
||||
@@ -1490,9 +1707,22 @@
|
||||
@@ -1489,9 +1706,22 @@
|
||||
} else if (this.world.isClientSide) {
|
||||
return null;
|
||||
} else {
|
||||
@@ -385,7 +385,7 @@
|
||||
this.world.addEntity(entityitem);
|
||||
return entityitem;
|
||||
}
|
||||
@@ -1596,7 +1826,7 @@
|
||||
@@ -1595,7 +1825,7 @@
|
||||
}
|
||||
|
||||
this.vehicle = entity;
|
||||
@@ -394,7 +394,7 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1621,15 +1851,36 @@
|
||||
@@ -1620,15 +1850,36 @@
|
||||
Entity entity = this.vehicle;
|
||||
|
||||
this.vehicle = null;
|
||||
@@ -433,7 +433,7 @@
|
||||
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.getRidingPassenger() instanceof EntityHuman)) {
|
||||
this.passengers.add(0, entity);
|
||||
} else {
|
||||
@@ -1637,15 +1888,33 @@
|
||||
@@ -1636,15 +1887,33 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -468,7 +468,7 @@
|
||||
}
|
||||
|
||||
protected boolean q(Entity entity) {
|
||||
@@ -1688,7 +1957,7 @@
|
||||
@@ -1687,7 +1956,7 @@
|
||||
int i = this.ab();
|
||||
|
||||
if (this.ai) {
|
||||
@@ -477,7 +477,7 @@
|
||||
this.world.getMethodProfiler().enter("portal");
|
||||
this.aj = i;
|
||||
this.portalCooldown = this.aW();
|
||||
@@ -1772,6 +2041,13 @@
|
||||
@@ -1771,6 +2040,13 @@
|
||||
}
|
||||
|
||||
public void setSwimming(boolean flag) {
|
||||
@@ -491,7 +491,7 @@
|
||||
this.setFlag(4, flag);
|
||||
}
|
||||
|
||||
@@ -1832,16 +2108,56 @@
|
||||
@@ -1831,16 +2107,56 @@
|
||||
}
|
||||
|
||||
public void setAirTicks(int i) {
|
||||
@@ -551,7 +551,7 @@
|
||||
}
|
||||
|
||||
public void j(boolean flag) {
|
||||
@@ -1989,20 +2305,33 @@
|
||||
@@ -1988,20 +2304,33 @@
|
||||
|
||||
@Nullable
|
||||
public Entity a(DimensionManager dimensionmanager) {
|
||||
@@ -588,9 +588,9 @@
|
||||
if (dimensionmanager1 == DimensionManager.THE_END && dimensionmanager == DimensionManager.OVERWORLD) {
|
||||
blockposition = worldserver1.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, worldserver1.getSpawn());
|
||||
} else if (dimensionmanager == DimensionManager.THE_END) {
|
||||
@@ -2040,6 +2369,25 @@
|
||||
vec3d = (Vec3D) ((Pair) pair.getSecond()).getFirst();
|
||||
f = (float) (Integer) ((Pair) pair.getSecond()).getSecond();
|
||||
@@ -2039,6 +2368,25 @@
|
||||
vec3d = shapedetector_c.b;
|
||||
f = (float) shapedetector_c.c;
|
||||
}
|
||||
+ } // CraftBukkit
|
||||
+
|
||||
@@ -614,7 +614,7 @@
|
||||
|
||||
this.world.getMethodProfiler().exitEnter("reloading");
|
||||
Entity entity = this.getEntityType().a((World) worldserver1);
|
||||
@@ -2049,6 +2397,14 @@
|
||||
@@ -2048,6 +2396,14 @@
|
||||
entity.setPositionRotation(blockposition, entity.yaw + f, entity.pitch);
|
||||
entity.setMot(vec3d);
|
||||
worldserver1.addEntityTeleport(entity);
|
||||
@@ -629,7 +629,7 @@
|
||||
}
|
||||
|
||||
this.dead = true;
|
||||
@@ -2240,7 +2596,26 @@
|
||||
@@ -2239,7 +2595,26 @@
|
||||
}
|
||||
|
||||
public void a(AxisAlignedBB axisalignedbb) {
|
||||
|
||||
Reference in New Issue
Block a user