mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
SPIGOT-5258: TNT Not Moving Players in Creative Mode
This commit is contained in:
parent
44d675ad8b
commit
b2bcde89d9
1 changed files with 23 additions and 16 deletions
|
@ -138,7 +138,14 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -690,10 +750,10 @@
|
@@ -684,16 +744,17 @@
|
||||||
|
if (this.isInvulnerable(damagesource)) {
|
||||||
|
return false;
|
||||||
|
} else if (this.abilities.isInvulnerable && !damagesource.ignoresInvulnerability()) {
|
||||||
|
+ this.forceExplosionKnockback = true; // SPIGOT-5258 - Make invulnerable players get knockback from explosions
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
this.ticksFarFromPlayer = 0;
|
||||||
if (this.getHealth() <= 0.0F) {
|
if (this.getHealth() <= 0.0F) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -151,7 +158,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.world.getDifficulty() == EnumDifficulty.EASY) {
|
if (this.world.getDifficulty() == EnumDifficulty.EASY) {
|
||||||
@@ -705,7 +765,13 @@
|
@@ -705,7 +766,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +173,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -720,10 +786,29 @@
|
@@ -720,10 +787,29 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(EntityHuman entityhuman) {
|
public boolean a(EntityHuman entityhuman) {
|
||||||
|
@ -199,7 +206,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -754,8 +839,13 @@
|
@@ -754,8 +840,13 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +221,7 @@
|
||||||
if (!this.isInvulnerable(damagesource)) {
|
if (!this.isInvulnerable(damagesource)) {
|
||||||
f = this.applyArmorModifier(damagesource, f);
|
f = this.applyArmorModifier(damagesource, f);
|
||||||
f = this.applyMagicModifier(damagesource, f);
|
f = this.applyMagicModifier(damagesource, f);
|
||||||
@@ -781,6 +871,7 @@
|
@@ -781,6 +872,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,7 +229,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openSign(TileEntitySign tileentitysign) {}
|
public void openSign(TileEntitySign tileentitysign) {}
|
||||||
@@ -911,8 +1002,15 @@
|
@@ -911,8 +1003,15 @@
|
||||||
if (entity instanceof EntityLiving) {
|
if (entity instanceof EntityLiving) {
|
||||||
f3 = ((EntityLiving) entity).getHealth();
|
f3 = ((EntityLiving) entity).getHealth();
|
||||||
if (j > 0 && !entity.isBurning()) {
|
if (j > 0 && !entity.isBurning()) {
|
||||||
|
@ -240,7 +247,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -940,8 +1038,11 @@
|
@@ -940,8 +1039,11 @@
|
||||||
EntityLiving entityliving = (EntityLiving) iterator.next();
|
EntityLiving entityliving = (EntityLiving) iterator.next();
|
||||||
|
|
||||||
if (entityliving != this && entityliving != entity && !this.r(entityliving) && (!(entityliving instanceof EntityArmorStand) || !((EntityArmorStand) entityliving).isMarker()) && this.h((Entity) entityliving) < 9.0D) {
|
if (entityliving != this && entityliving != entity && !this.r(entityliving) && (!(entityliving instanceof EntityArmorStand) || !((EntityArmorStand) entityliving).isMarker()) && this.h((Entity) entityliving) < 9.0D) {
|
||||||
|
@ -253,7 +260,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -950,9 +1051,26 @@
|
@@ -950,9 +1052,26 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity instanceof EntityPlayer && entity.velocityChanged) {
|
if (entity instanceof EntityPlayer && entity.velocityChanged) {
|
||||||
|
@ -280,7 +287,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag2) {
|
if (flag2) {
|
||||||
@@ -997,7 +1115,14 @@
|
@@ -997,7 +1116,14 @@
|
||||||
|
|
||||||
this.a(StatisticList.DAMAGE_DEALT, Math.round(f5 * 10.0F));
|
this.a(StatisticList.DAMAGE_DEALT, Math.round(f5 * 10.0F));
|
||||||
if (j > 0) {
|
if (j > 0) {
|
||||||
|
@ -296,7 +303,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.world instanceof WorldServer && f5 > 2.0F) {
|
if (this.world instanceof WorldServer && f5 > 2.0F) {
|
||||||
@@ -1013,6 +1138,11 @@
|
@@ -1013,6 +1139,11 @@
|
||||||
if (flag4) {
|
if (flag4) {
|
||||||
entity.extinguish();
|
entity.extinguish();
|
||||||
}
|
}
|
||||||
|
@ -308,7 +315,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1072,15 +1202,15 @@
|
@@ -1072,15 +1203,15 @@
|
||||||
return this.bW;
|
return this.bW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,7 +335,7 @@
|
||||||
return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE);
|
return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1108,6 +1238,34 @@
|
@@ -1108,6 +1239,34 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -363,7 +370,7 @@
|
||||||
|
|
||||||
this.e(blockposition);
|
this.e(blockposition);
|
||||||
this.sleepTicks = 0;
|
this.sleepTicks = 0;
|
||||||
@@ -1148,6 +1306,24 @@
|
@@ -1148,6 +1307,24 @@
|
||||||
((WorldServer) this.world).everyoneSleeping();
|
((WorldServer) this.world).everyoneSleeping();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,7 +395,7 @@
|
||||||
this.sleepTicks = flag ? 0 : 100;
|
this.sleepTicks = flag ? 0 : 100;
|
||||||
if (flag2) {
|
if (flag2) {
|
||||||
optional.ifPresent((blockposition) -> {
|
optional.ifPresent((blockposition) -> {
|
||||||
@@ -1201,9 +1377,11 @@
|
@@ -1201,9 +1378,11 @@
|
||||||
if (blockposition != null) {
|
if (blockposition != null) {
|
||||||
this.g = blockposition;
|
this.g = blockposition;
|
||||||
this.bU = flag;
|
this.bU = flag;
|
||||||
|
@ -400,7 +407,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1275,7 +1453,11 @@
|
@@ -1275,7 +1454,11 @@
|
||||||
this.setMot(vec3d2.x, d3 * 0.6D, vec3d2.z);
|
this.setMot(vec3d2.x, d3 * 0.6D, vec3d2.z);
|
||||||
this.aO = f;
|
this.aO = f;
|
||||||
this.fallDistance = 0.0F;
|
this.fallDistance = 0.0F;
|
||||||
|
@ -413,7 +420,7 @@
|
||||||
} else {
|
} else {
|
||||||
super.e(vec3d);
|
super.e(vec3d);
|
||||||
}
|
}
|
||||||
@@ -1597,26 +1779,31 @@
|
@@ -1597,26 +1780,31 @@
|
||||||
|
|
||||||
protected void releaseShoulderEntities() {
|
protected void releaseShoulderEntities() {
|
||||||
if (this.e + 20L < this.world.getTime()) {
|
if (this.e + 20L < this.world.getTime()) {
|
||||||
|
|
Loading…
Reference in a new issue