@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/Entity.java
|
||||
+++ b/net/minecraft/server/Entity.java
|
||||
@@ -21,8 +21,58 @@
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -106,8 +106,58 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
protected static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final AtomicInteger entityCount = new AtomicInteger();
|
||||
private static final List<ItemStack> c = Collections.emptyList();
|
||||
@@ -106,6 +156,21 @@
|
||||
@@ -191,6 +241,21 @@
|
||||
private long aB;
|
||||
private EntitySize size;
|
||||
private float headHeight;
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
public Entity(EntityTypes<?> entitytypes, World world) {
|
||||
this.id = Entity.entityCount.incrementAndGet();
|
||||
@@ -212,6 +277,12 @@
|
||||
@@ -297,6 +362,12 @@
|
||||
}
|
||||
|
||||
public void setPose(EntityPose entitypose) {
|
||||
@@ -94,7 +94,7 @@
|
||||
this.datawatcher.set(Entity.POSE, entitypose);
|
||||
}
|
||||
|
||||
@@ -228,6 +299,33 @@
|
||||
@@ -313,6 +384,33 @@
|
||||
}
|
||||
|
||||
protected void setYawPitch(float f, float f1) {
|
||||
@@ -128,7 +128,7 @@
|
||||
this.yaw = f % 360.0F;
|
||||
this.pitch = f1 % 360.0F;
|
||||
}
|
||||
@@ -235,6 +333,7 @@
|
||||
@@ -320,6 +418,7 @@
|
||||
public void setPosition(double d0, double d1, double d2) {
|
||||
this.setPositionRaw(d0, d1, d2);
|
||||
this.a(this.size.a(d0, d1, d2));
|
||||
@@ -136,7 +136,7 @@
|
||||
}
|
||||
|
||||
protected void af() {
|
||||
@@ -249,6 +348,15 @@
|
||||
@@ -334,6 +433,15 @@
|
||||
this.entityBaseTick();
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
public void entityBaseTick() {
|
||||
this.world.getMethodProfiler().enter("entityBaseTick");
|
||||
if (this.isPassenger() && this.getVehicle().dead) {
|
||||
@@ -262,7 +370,7 @@
|
||||
@@ -347,7 +455,7 @@
|
||||
this.z = this.A;
|
||||
this.lastPitch = this.pitch;
|
||||
this.lastYaw = this.yaw;
|
||||
@@ -161,7 +161,7 @@
|
||||
if (this.aO()) {
|
||||
this.aP();
|
||||
}
|
||||
@@ -325,12 +433,44 @@
|
||||
@@ -410,12 +518,44 @@
|
||||
|
||||
protected void burnFromLava() {
|
||||
if (!this.isFireProof()) {
|
||||
@@ -207,7 +207,7 @@
|
||||
int j = i * 20;
|
||||
|
||||
if (this instanceof EntityLiving) {
|
||||
@@ -427,6 +567,28 @@
|
||||
@@ -512,6 +652,28 @@
|
||||
block.a((IBlockAccess) this.world, this);
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
if (this.onGround && !this.bv()) {
|
||||
block.stepOn(this.world, blockposition, this);
|
||||
}
|
||||
@@ -700,6 +862,7 @@
|
||||
@@ -785,6 +947,7 @@
|
||||
AxisAlignedBB axisalignedbb = this.getBoundingBox();
|
||||
|
||||
this.setPositionRaw((axisalignedbb.minX + axisalignedbb.maxX) / 2.0D, axisalignedbb.minY, (axisalignedbb.minZ + axisalignedbb.maxZ) / 2.0D);
|
||||
@@ -244,7 +244,7 @@
|
||||
}
|
||||
|
||||
protected SoundEffect getSoundSwim() {
|
||||
@@ -1025,6 +1188,13 @@
|
||||
@@ -1110,6 +1273,13 @@
|
||||
}
|
||||
|
||||
public void spawnIn(World world) {
|
||||
@@ -258,7 +258,7 @@
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
@@ -1044,6 +1214,7 @@
|
||||
@@ -1129,6 +1299,7 @@
|
||||
this.lastY = d1;
|
||||
this.lastZ = d4;
|
||||
this.setPosition(d3, d1, d4);
|
||||
@@ -266,7 +266,7 @@
|
||||
}
|
||||
|
||||
public void d(Vec3D vec3d) {
|
||||
@@ -1218,6 +1389,12 @@
|
||||
@@ -1303,6 +1474,12 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
public void a(Entity entity, int i, DamageSource damagesource) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource);
|
||||
@@ -1228,7 +1405,7 @@
|
||||
@@ -1313,7 +1490,7 @@
|
||||
public boolean a_(NBTTagCompound nbttagcompound) {
|
||||
String s = this.getSaveID();
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
nbttagcompound.setString("id", s);
|
||||
this.save(nbttagcompound);
|
||||
return true;
|
||||
@@ -1252,6 +1429,18 @@
|
||||
@@ -1337,6 +1514,18 @@
|
||||
Vec3D vec3d = this.getMot();
|
||||
|
||||
nbttagcompound.set("Motion", this.a(vec3d.x, vec3d.y, vec3d.z));
|
||||
@@ -307,7 +307,7 @@
|
||||
nbttagcompound.set("Rotation", this.a(this.yaw, this.pitch));
|
||||
nbttagcompound.setFloat("FallDistance", this.fallDistance);
|
||||
nbttagcompound.setShort("Fire", (short) this.fireTicks);
|
||||
@@ -1260,6 +1449,18 @@
|
||||
@@ -1345,6 +1534,18 @@
|
||||
nbttagcompound.setBoolean("Invulnerable", this.invulnerable);
|
||||
nbttagcompound.setInt("PortalCooldown", this.portalCooldown);
|
||||
nbttagcompound.a("UUID", this.getUniqueID());
|
||||
@@ -326,7 +326,7 @@
|
||||
IChatBaseComponent ichatbasecomponent = this.getCustomName();
|
||||
|
||||
if (ichatbasecomponent != null) {
|
||||
@@ -1317,6 +1518,11 @@
|
||||
@@ -1402,6 +1603,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
||||
@@ -1394,6 +1600,49 @@
|
||||
@@ -1479,6 +1685,49 @@
|
||||
} else {
|
||||
throw new IllegalStateException("Entity has invalid position");
|
||||
}
|
||||
@@ -388,7 +388,7 @@
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
||||
@@ -1469,9 +1718,22 @@
|
||||
@@ -1554,9 +1803,22 @@
|
||||
} else if (this.world.isClientSide) {
|
||||
return null;
|
||||
} else {
|
||||
@@ -411,7 +411,7 @@
|
||||
this.world.addEntity(entityitem);
|
||||
return entityitem;
|
||||
}
|
||||
@@ -1555,7 +1817,7 @@
|
||||
@@ -1640,7 +1902,7 @@
|
||||
|
||||
this.setPose(EntityPose.STANDING);
|
||||
this.vehicle = entity;
|
||||
@@ -420,7 +420,7 @@
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1580,7 +1842,7 @@
|
||||
@@ -1665,7 +1927,7 @@
|
||||
Entity entity = this.vehicle;
|
||||
|
||||
this.vehicle = null;
|
||||
@@ -429,7 +429,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1589,10 +1851,31 @@
|
||||
@@ -1674,10 +1936,31 @@
|
||||
this.bf();
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@
|
||||
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.getRidingPassenger() instanceof EntityHuman)) {
|
||||
this.passengers.add(0, entity);
|
||||
} else {
|
||||
@@ -1600,15 +1883,36 @@
|
||||
@@ -1685,15 +1968,36 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -500,7 +500,7 @@
|
||||
}
|
||||
|
||||
protected boolean q(Entity entity) {
|
||||
@@ -1646,14 +1950,20 @@
|
||||
@@ -1731,14 +2035,20 @@
|
||||
|
||||
if (this.inPortal) {
|
||||
MinecraftServer minecraftserver = worldserver.getMinecraftServer();
|
||||
@@ -524,7 +524,7 @@
|
||||
this.world.getMethodProfiler().exit();
|
||||
}
|
||||
|
||||
@@ -1753,6 +2063,13 @@
|
||||
@@ -1838,6 +2148,13 @@
|
||||
}
|
||||
|
||||
public void setSwimming(boolean flag) {
|
||||
@@ -538,7 +538,7 @@
|
||||
this.setFlag(4, flag);
|
||||
}
|
||||
|
||||
@@ -1785,8 +2102,12 @@
|
||||
@@ -1870,8 +2187,12 @@
|
||||
return this.getScoreboardTeam() != null ? this.getScoreboardTeam().isAlly(scoreboardteambase) : false;
|
||||
}
|
||||
|
||||
@@ -552,7 +552,7 @@
|
||||
}
|
||||
|
||||
public boolean getFlag(int i) {
|
||||
@@ -1813,16 +2134,56 @@
|
||||
@@ -1898,16 +2219,56 @@
|
||||
}
|
||||
|
||||
public void setAirTicks(int i) {
|
||||
@@ -612,7 +612,7 @@
|
||||
}
|
||||
|
||||
public void k(boolean flag) {
|
||||
@@ -1972,15 +2333,32 @@
|
||||
@@ -2057,15 +2418,32 @@
|
||||
|
||||
@Nullable
|
||||
public Entity b(WorldServer worldserver) {
|
||||
@@ -647,7 +647,7 @@
|
||||
this.world.getMethodProfiler().exitEnter("reloading");
|
||||
Entity entity = this.getEntityType().a((World) worldserver);
|
||||
|
||||
@@ -1989,9 +2367,17 @@
|
||||
@@ -2074,9 +2452,17 @@
|
||||
entity.setPositionRotation(shapedetectorshape.position.x, shapedetectorshape.position.y, shapedetectorshape.position.z, shapedetectorshape.yaw, entity.pitch);
|
||||
entity.setMot(shapedetectorshape.velocity);
|
||||
worldserver.addEntityTeleport(entity);
|
||||
@@ -667,7 +667,7 @@
|
||||
}
|
||||
|
||||
this.bN();
|
||||
@@ -2012,13 +2398,18 @@
|
||||
@@ -2097,13 +2483,18 @@
|
||||
|
||||
@Nullable
|
||||
protected ShapeDetectorShape a(WorldServer worldserver) {
|
||||
@@ -690,7 +690,7 @@
|
||||
return null;
|
||||
} else {
|
||||
WorldBorder worldborder = worldserver.getWorldBorder();
|
||||
@@ -2028,8 +2419,16 @@
|
||||
@@ -2113,8 +2504,16 @@
|
||||
double d3 = Math.min(2.9999872E7D, worldborder.h() - 16.0D);
|
||||
double d4 = DimensionManager.a(this.world.getDimensionManager(), worldserver.getDimensionManager());
|
||||
BlockPosition blockposition = new BlockPosition(MathHelper.a(this.locX() * d4, d0, d2), this.locY(), MathHelper.a(this.locZ() * d4, d1, d3));
|
||||
@@ -708,7 +708,7 @@
|
||||
IBlockData iblockdata = this.world.getType(this.ac);
|
||||
EnumDirection.EnumAxis enumdirection_enumaxis;
|
||||
Vec3D vec3d;
|
||||
@@ -2046,8 +2445,8 @@
|
||||
@@ -2131,8 +2530,8 @@
|
||||
vec3d = new Vec3D(0.5D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
@@ -719,7 +719,7 @@
|
||||
}
|
||||
} else {
|
||||
BlockPosition blockposition1;
|
||||
@@ -2057,8 +2456,15 @@
|
||||
@@ -2142,8 +2541,15 @@
|
||||
} else {
|
||||
blockposition1 = worldserver.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING_NO_LEAVES, worldserver.getSpawn());
|
||||
}
|
||||
@@ -736,7 +736,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2066,8 +2472,23 @@
|
||||
@@ -2151,8 +2557,23 @@
|
||||
return BlockPortalShape.a(blockutil_rectangle, enumdirection_enumaxis, this.getPositionVector(), this.a(this.getPose()));
|
||||
}
|
||||
|
||||
@@ -762,7 +762,7 @@
|
||||
}
|
||||
|
||||
public boolean canPortal() {
|
||||
@@ -2253,7 +2674,26 @@
|
||||
@@ -2338,7 +2759,26 @@
|
||||
}
|
||||
|
||||
public void a(AxisAlignedBB axisalignedbb) {
|
||||
|
||||
Reference in New Issue
Block a user