mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 17:52:02 -07:00
Update to Minecraft 1.10
This commit is contained in:
@@ -48,17 +48,17 @@
|
||||
private static final Logger a = LogManager.getLogger();
|
||||
private static final AxisAlignedBB b = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
|
||||
private static double c = 1.0D;
|
||||
@@ -98,6 +137,9 @@
|
||||
@@ -99,6 +138,9 @@
|
||||
public boolean glowing;
|
||||
private final Set<String> aG;
|
||||
private boolean aH;
|
||||
private final Set<String> aH;
|
||||
private boolean aI;
|
||||
+ public boolean valid; // CraftBukkit
|
||||
+ public org.bukkit.projectiles.ProjectileSource projectileSource; // CraftBukkit - For projectiles only
|
||||
+ public boolean forceExplosionKnockback; // CraftBukkit - SPIGOT-949
|
||||
|
||||
public Entity(World world) {
|
||||
this.id = Entity.entityCount++;
|
||||
@@ -195,6 +237,33 @@
|
||||
@@ -197,6 +239,33 @@
|
||||
}
|
||||
|
||||
protected void setYawPitch(float f, float f1) {
|
||||
@@ -92,8 +92,8 @@
|
||||
this.yaw = f % 360.0F;
|
||||
this.pitch = f1 % 360.0F;
|
||||
}
|
||||
@@ -238,7 +307,7 @@
|
||||
if (this.ak) {
|
||||
@@ -240,7 +309,7 @@
|
||||
if (this.al) {
|
||||
MinecraftServer minecraftserver = this.world.getMinecraftServer();
|
||||
|
||||
- if (minecraftserver.getAllowNether()) {
|
||||
@@ -101,7 +101,7 @@
|
||||
if (!this.isPassenger()) {
|
||||
int i = this.V();
|
||||
|
||||
@@ -323,6 +392,27 @@
|
||||
@@ -325,6 +394,27 @@
|
||||
protected void burnFromLava() {
|
||||
if (!this.fireProof) {
|
||||
this.damageEntity(DamageSource.LAVA, 4.0F);
|
||||
@@ -129,7 +129,7 @@
|
||||
this.setOnFire(15);
|
||||
}
|
||||
}
|
||||
@@ -363,6 +453,22 @@
|
||||
@@ -365,6 +455,22 @@
|
||||
this.a(this.getBoundingBox().c(d0, d1, d2));
|
||||
this.recalcPosition();
|
||||
} else {
|
||||
@@ -208,7 +208,7 @@
|
||||
+ */
|
||||
+ // CraftBukkit end
|
||||
|
||||
boolean flag2 = this.ah();
|
||||
boolean flag2 = this.ai();
|
||||
|
||||
@@ -634,7 +765,16 @@
|
||||
this.burn(1);
|
||||
@@ -228,7 +228,7 @@
|
||||
this.setOnFire(8);
|
||||
}
|
||||
}
|
||||
@@ -748,7 +888,7 @@
|
||||
@@ -756,7 +896,7 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
if (!this.fireProof) {
|
||||
this.damageEntity(DamageSource.FIRE, (float) i);
|
||||
}
|
||||
@@ -914,6 +1054,13 @@
|
||||
@@ -922,6 +1062,13 @@
|
||||
}
|
||||
|
||||
public void spawnIn(World world) {
|
||||
@@ -251,7 +251,7 @@
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
@@ -1107,6 +1254,18 @@
|
||||
@@ -1126,6 +1273,18 @@
|
||||
try {
|
||||
nbttagcompound.set("Pos", this.a(new double[] { this.locX, this.locY, this.locZ}));
|
||||
nbttagcompound.set("Motion", this.a(new double[] { this.motX, this.motY, this.motZ}));
|
||||
@@ -270,7 +270,7 @@
|
||||
nbttagcompound.set("Rotation", this.a(new float[] { this.yaw, this.pitch}));
|
||||
nbttagcompound.setFloat("FallDistance", this.fallDistance);
|
||||
nbttagcompound.setShort("Fire", (short) this.fireTicks);
|
||||
@@ -1116,6 +1275,12 @@
|
||||
@@ -1135,6 +1294,12 @@
|
||||
nbttagcompound.setBoolean("Invulnerable", this.invulnerable);
|
||||
nbttagcompound.setInt("PortalCooldown", this.portalCooldown);
|
||||
nbttagcompound.a("UUID", this.getUniqueID());
|
||||
@@ -283,7 +283,7 @@
|
||||
if (this.getCustomName() != null && !this.getCustomName().isEmpty()) {
|
||||
nbttagcompound.setString("CustomName", this.getCustomName());
|
||||
}
|
||||
@@ -1187,6 +1352,8 @@
|
||||
@@ -1210,6 +1375,8 @@
|
||||
this.motX = nbttaglist1.e(0);
|
||||
this.motY = nbttaglist1.e(1);
|
||||
this.motZ = nbttaglist1.e(2);
|
||||
@@ -292,15 +292,15 @@
|
||||
if (Math.abs(this.motX) > 10.0D) {
|
||||
this.motX = 0.0D;
|
||||
}
|
||||
@@ -1198,6 +1365,7 @@
|
||||
@@ -1221,6 +1388,7 @@
|
||||
if (Math.abs(this.motZ) > 10.0D) {
|
||||
this.motZ = 0.0D;
|
||||
}
|
||||
+ // CraftBukkit end */
|
||||
|
||||
this.lastX = this.M = this.locX = nbttaglist.e(0);
|
||||
this.lastY = this.N = this.locY = nbttaglist.e(1);
|
||||
@@ -1246,6 +1414,58 @@
|
||||
this.locX = nbttaglist.e(0);
|
||||
this.locY = nbttaglist.e(1);
|
||||
@@ -1278,6 +1446,58 @@
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
||||
@@ -1307,6 +1527,12 @@
|
||||
@@ -1337,6 +1557,12 @@
|
||||
|
||||
public EntityItem a(ItemStack itemstack, float f) {
|
||||
if (itemstack.count != 0 && itemstack.getItem() != null) {
|
||||
@@ -372,8 +372,8 @@
|
||||
EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY + (double) f, this.locZ, itemstack);
|
||||
|
||||
entityitem.q();
|
||||
@@ -1428,6 +1654,24 @@
|
||||
if (entity.bz() != this) {
|
||||
@@ -1458,6 +1684,24 @@
|
||||
if (entity.bB() != this) {
|
||||
throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
|
||||
} else {
|
||||
+ // CraftBukkit start
|
||||
@@ -394,11 +394,11 @@
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bu() instanceof EntityHuman)) {
|
||||
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bw() instanceof EntityHuman)) {
|
||||
this.passengers.add(0, entity);
|
||||
} else {
|
||||
@@ -1441,6 +1685,22 @@
|
||||
if (entity.bz() == this) {
|
||||
@@ -1471,6 +1715,22 @@
|
||||
if (entity.bB() == this) {
|
||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||
} else {
|
||||
+ // CraftBukkit start
|
||||
@@ -420,7 +420,7 @@
|
||||
this.passengers.remove(entity);
|
||||
entity.j = 60;
|
||||
}
|
||||
@@ -1584,10 +1844,38 @@
|
||||
@@ -1614,10 +1874,38 @@
|
||||
}
|
||||
|
||||
public void onLightningStrike(EntityLightning entitylightning) {
|
||||
@@ -461,7 +461,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1722,19 +2010,67 @@
|
||||
@@ -1752,19 +2040,67 @@
|
||||
if (!this.world.isClientSide && !this.dead) {
|
||||
this.world.methodProfiler.a("changeDimension");
|
||||
MinecraftServer minecraftserver = this.h();
|
||||
@@ -532,7 +532,7 @@
|
||||
BlockPosition blockposition;
|
||||
|
||||
if (i == 1) {
|
||||
@@ -1763,12 +2099,18 @@
|
||||
@@ -1793,12 +2129,18 @@
|
||||
blockposition = new BlockPosition(this);
|
||||
}
|
||||
|
||||
@@ -552,7 +552,7 @@
|
||||
if (j == 1 && i == 1) {
|
||||
BlockPosition blockposition1 = worldserver1.q(worldserver1.getSpawn());
|
||||
|
||||
@@ -1776,6 +2118,7 @@
|
||||
@@ -1806,6 +2148,7 @@
|
||||
} else {
|
||||
entity.setPositionRotation(blockposition, entity.yaw, entity.pitch);
|
||||
}
|
||||
@@ -560,7 +560,7 @@
|
||||
|
||||
boolean flag = entity.attachedToPlayer;
|
||||
|
||||
@@ -1783,6 +2126,14 @@
|
||||
@@ -1813,6 +2156,14 @@
|
||||
worldserver1.addEntity(entity);
|
||||
entity.attachedToPlayer = flag;
|
||||
worldserver1.entityJoinedWorld(entity, false);
|
||||
@@ -575,7 +575,7 @@
|
||||
}
|
||||
|
||||
this.dead = true;
|
||||
@@ -1893,6 +2244,11 @@
|
||||
@@ -1923,6 +2274,11 @@
|
||||
}
|
||||
|
||||
public void setCustomName(String s) {
|
||||
@@ -587,7 +587,7 @@
|
||||
this.datawatcher.set(Entity.aA, s);
|
||||
}
|
||||
|
||||
@@ -1950,7 +2306,26 @@
|
||||
@@ -1980,7 +2336,26 @@
|
||||
}
|
||||
|
||||
public void a(AxisAlignedBB axisalignedbb) {
|
||||
@@ -615,8 +615,8 @@
|
||||
}
|
||||
|
||||
public float getHeadHeight() {
|
||||
@@ -2124,7 +2499,7 @@
|
||||
for (Iterator iterator = this.bv().iterator(); iterator.hasNext(); entity.a(oclass, set)) {
|
||||
@@ -2154,7 +2529,7 @@
|
||||
for (Iterator iterator = this.bx().iterator(); iterator.hasNext(); entity.a(oclass, set)) {
|
||||
entity = (Entity) iterator.next();
|
||||
if (oclass.isAssignableFrom(entity.getClass())) {
|
||||
- set.add(entity);
|
||||
|
Reference in New Issue
Block a user