mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 12:41:50 +01:00
Restore some Vanilla behaviour to fix magma blocks
This commit is contained in:
parent
9b4ad2a45f
commit
885f4dce9e
1 changed files with 21 additions and 34 deletions
|
@ -179,20 +179,7 @@
|
|||
if (this.playStepSound() && !flag && !this.isPassenger()) {
|
||||
double d21 = this.locX - d3;
|
||||
double d22 = this.locY - d4;
|
||||
@@ -597,7 +723,7 @@
|
||||
}
|
||||
|
||||
if (block1 != null && this.onGround) {
|
||||
- block1.stepOn(this.world, blockposition, this);
|
||||
+ // block1.stepOn(this.world, blockposition, this); // CraftBukkit moved down
|
||||
}
|
||||
|
||||
this.J = (float) ((double) this.J + (double) MathHelper.sqrt(d21 * d21 + d10 * d10) * 0.6D);
|
||||
@@ -615,9 +741,12 @@
|
||||
}
|
||||
|
||||
this.a(blockposition, block1);
|
||||
+ block1.stepOn(this.world, blockposition, this); // CraftBukkit moved from above
|
||||
@@ -618,6 +744,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -201,7 +188,7 @@
|
|||
try {
|
||||
this.checkBlockCollisions();
|
||||
} catch (Throwable throwable) {
|
||||
@@ -627,6 +756,8 @@
|
||||
@@ -627,6 +755,8 @@
|
||||
this.appendEntityCrashDetails(crashreportsystemdetails);
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
@ -210,7 +197,7 @@
|
|||
|
||||
boolean flag2 = this.ai();
|
||||
|
||||
@@ -634,7 +765,16 @@
|
||||
@@ -634,7 +764,16 @@
|
||||
this.burn(1);
|
||||
if (!flag2) {
|
||||
++this.fireTicks;
|
||||
|
@ -228,7 +215,7 @@
|
|||
this.setOnFire(8);
|
||||
}
|
||||
}
|
||||
@@ -756,7 +896,7 @@
|
||||
@@ -756,7 +895,7 @@
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -237,7 +224,7 @@
|
|||
if (!this.fireProof) {
|
||||
this.damageEntity(DamageSource.FIRE, (float) i);
|
||||
}
|
||||
@@ -922,6 +1062,13 @@
|
||||
@@ -922,6 +1061,13 @@
|
||||
}
|
||||
|
||||
public void spawnIn(World world) {
|
||||
|
@ -251,7 +238,7 @@
|
|||
this.world = world;
|
||||
}
|
||||
|
||||
@@ -1126,6 +1273,18 @@
|
||||
@@ -1126,6 +1272,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 +257,7 @@
|
|||
nbttagcompound.set("Rotation", this.a(new float[] { this.yaw, this.pitch}));
|
||||
nbttagcompound.setFloat("FallDistance", this.fallDistance);
|
||||
nbttagcompound.setShort("Fire", (short) this.fireTicks);
|
||||
@@ -1135,6 +1294,12 @@
|
||||
@@ -1135,6 +1293,12 @@
|
||||
nbttagcompound.setBoolean("Invulnerable", this.invulnerable);
|
||||
nbttagcompound.setInt("PortalCooldown", this.portalCooldown);
|
||||
nbttagcompound.a("UUID", this.getUniqueID());
|
||||
|
@ -283,7 +270,7 @@
|
|||
if (this.getCustomName() != null && !this.getCustomName().isEmpty()) {
|
||||
nbttagcompound.setString("CustomName", this.getCustomName());
|
||||
}
|
||||
@@ -1210,6 +1375,8 @@
|
||||
@@ -1210,6 +1374,8 @@
|
||||
this.motX = nbttaglist1.e(0);
|
||||
this.motY = nbttaglist1.e(1);
|
||||
this.motZ = nbttaglist1.e(2);
|
||||
|
@ -292,7 +279,7 @@
|
|||
if (Math.abs(this.motX) > 10.0D) {
|
||||
this.motX = 0.0D;
|
||||
}
|
||||
@@ -1221,6 +1388,7 @@
|
||||
@@ -1221,6 +1387,7 @@
|
||||
if (Math.abs(this.motZ) > 10.0D) {
|
||||
this.motZ = 0.0D;
|
||||
}
|
||||
|
@ -300,7 +287,7 @@
|
|||
|
||||
this.locX = nbttaglist.e(0);
|
||||
this.locY = nbttaglist.e(1);
|
||||
@@ -1278,6 +1446,58 @@
|
||||
@@ -1278,6 +1445,58 @@
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
}
|
||||
|
||||
|
@ -359,7 +346,7 @@
|
|||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
||||
@@ -1337,6 +1557,12 @@
|
||||
@@ -1337,6 +1556,12 @@
|
||||
|
||||
public EntityItem a(ItemStack itemstack, float f) {
|
||||
if (itemstack.count != 0 && itemstack.getItem() != null) {
|
||||
|
@ -372,7 +359,7 @@
|
|||
EntityItem entityitem = new EntityItem(this.world, this.locX, this.locY + (double) f, this.locZ, itemstack);
|
||||
|
||||
entityitem.q();
|
||||
@@ -1458,6 +1684,24 @@
|
||||
@@ -1458,6 +1683,24 @@
|
||||
if (entity.bB() != this) {
|
||||
throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
|
||||
} else {
|
||||
|
@ -397,7 +384,7 @@
|
|||
if (!this.world.isClientSide && entity instanceof EntityHuman && !(this.bw() instanceof EntityHuman)) {
|
||||
this.passengers.add(0, entity);
|
||||
} else {
|
||||
@@ -1471,6 +1715,22 @@
|
||||
@@ -1471,6 +1714,22 @@
|
||||
if (entity.bB() == this) {
|
||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||
} else {
|
||||
|
@ -420,7 +407,7 @@
|
|||
this.passengers.remove(entity);
|
||||
entity.j = 60;
|
||||
}
|
||||
@@ -1614,10 +1874,38 @@
|
||||
@@ -1614,10 +1873,38 @@
|
||||
}
|
||||
|
||||
public void onLightningStrike(EntityLightning entitylightning) {
|
||||
|
@ -461,7 +448,7 @@
|
|||
}
|
||||
|
||||
}
|
||||
@@ -1752,19 +2040,67 @@
|
||||
@@ -1752,19 +2039,67 @@
|
||||
if (!this.world.isClientSide && !this.dead) {
|
||||
this.world.methodProfiler.a("changeDimension");
|
||||
MinecraftServer minecraftserver = this.h();
|
||||
|
@ -532,7 +519,7 @@
|
|||
BlockPosition blockposition;
|
||||
|
||||
if (i == 1) {
|
||||
@@ -1793,12 +2129,18 @@
|
||||
@@ -1793,12 +2128,18 @@
|
||||
blockposition = new BlockPosition(this);
|
||||
}
|
||||
|
||||
|
@ -552,7 +539,7 @@
|
|||
if (j == 1 && i == 1) {
|
||||
BlockPosition blockposition1 = worldserver1.q(worldserver1.getSpawn());
|
||||
|
||||
@@ -1806,6 +2148,7 @@
|
||||
@@ -1806,6 +2147,7 @@
|
||||
} else {
|
||||
entity.setPositionRotation(blockposition, entity.yaw, entity.pitch);
|
||||
}
|
||||
|
@ -560,7 +547,7 @@
|
|||
|
||||
boolean flag = entity.attachedToPlayer;
|
||||
|
||||
@@ -1813,6 +2156,14 @@
|
||||
@@ -1813,6 +2155,14 @@
|
||||
worldserver1.addEntity(entity);
|
||||
entity.attachedToPlayer = flag;
|
||||
worldserver1.entityJoinedWorld(entity, false);
|
||||
|
@ -575,7 +562,7 @@
|
|||
}
|
||||
|
||||
this.dead = true;
|
||||
@@ -1923,6 +2274,11 @@
|
||||
@@ -1923,6 +2273,11 @@
|
||||
}
|
||||
|
||||
public void setCustomName(String s) {
|
||||
|
@ -587,7 +574,7 @@
|
|||
this.datawatcher.set(Entity.aA, s);
|
||||
}
|
||||
|
||||
@@ -1980,7 +2336,26 @@
|
||||
@@ -1980,7 +2335,26 @@
|
||||
}
|
||||
|
||||
public void a(AxisAlignedBB axisalignedbb) {
|
||||
|
@ -615,7 +602,7 @@
|
|||
}
|
||||
|
||||
public float getHeadHeight() {
|
||||
@@ -2154,7 +2529,7 @@
|
||||
@@ -2154,7 +2528,7 @@
|
||||
for (Iterator iterator = this.bx().iterator(); iterator.hasNext(); entity.a(oclass, set)) {
|
||||
entity = (Entity) iterator.next();
|
||||
if (oclass.isAssignableFrom(entity.getClass())) {
|
||||
|
|
Loading…
Reference in a new issue