geforkt von Mirrors/Paper
Configurable sprint interruption on attack
If the sprint interruption is disabled players continue sprinting when they attack entities.
Dieser Commit ist enthalten in:
Ursprung
4b7a93d5e1
Commit
5a528af05e
@ -278,7 +278,19 @@
|
|||||||
if (flag2) {
|
if (flag2) {
|
||||||
f *= 1.5F;
|
f *= 1.5F;
|
||||||
}
|
}
|
||||||
@@ -1223,8 +1295,13 @@
|
@@ -1208,7 +1280,11 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
||||||
|
+ // Paper start - Configurable sprint interruption on attack
|
||||||
|
+ if (!this.level().paperConfig().misc.disableSprintInterruptionOnAttack) {
|
||||||
|
this.setSprinting(false);
|
||||||
|
+ }
|
||||||
|
+ // Paper end - Configurable sprint interruption on attack
|
||||||
|
}
|
||||||
|
|
||||||
|
LivingEntity entityliving2;
|
||||||
|
@@ -1223,8 +1299,13 @@
|
||||||
if (entityliving2 != this && entityliving2 != target && !this.isAlliedTo((Entity) entityliving2) && (!(entityliving2 instanceof ArmorStand) || !((ArmorStand) entityliving2).isMarker()) && this.distanceToSqr((Entity) entityliving2) < 9.0D) {
|
if (entityliving2 != this && entityliving2 != target && !this.isAlliedTo((Entity) entityliving2) && (!(entityliving2 instanceof ArmorStand) || !((ArmorStand) entityliving2).isMarker()) && this.distanceToSqr((Entity) entityliving2) < 9.0D) {
|
||||||
float f7 = this.getEnchantedDamage(entityliving2, f6, damagesource) * f2;
|
float f7 = this.getEnchantedDamage(entityliving2, f6, damagesource) * f2;
|
||||||
|
|
||||||
@ -293,7 +305,7 @@
|
|||||||
Level world = this.level();
|
Level world = this.level();
|
||||||
|
|
||||||
if (world instanceof ServerLevel) {
|
if (world instanceof ServerLevel) {
|
||||||
@@ -1235,26 +1312,43 @@
|
@@ -1235,26 +1316,43 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -341,7 +353,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1308,9 +1402,14 @@
|
@@ -1308,9 +1406,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,7 +370,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1351,7 +1450,14 @@
|
@@ -1351,7 +1454,14 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void remove(Entity.RemovalReason reason) {
|
public void remove(Entity.RemovalReason reason) {
|
||||||
@ -374,7 +386,7 @@
|
|||||||
this.inventoryMenu.removed(this);
|
this.inventoryMenu.removed(this);
|
||||||
if (this.containerMenu != null && this.hasContainerOpen()) {
|
if (this.containerMenu != null && this.hasContainerOpen()) {
|
||||||
this.doCloseContainer();
|
this.doCloseContainer();
|
||||||
@@ -1391,7 +1497,13 @@
|
@@ -1391,7 +1501,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public Either<Player.BedSleepingProblem, Unit> startSleepInBed(BlockPos pos) {
|
public Either<Player.BedSleepingProblem, Unit> startSleepInBed(BlockPos pos) {
|
||||||
@ -389,7 +401,7 @@
|
|||||||
this.sleepCounter = 0;
|
this.sleepCounter = 0;
|
||||||
return Either.right(Unit.INSTANCE);
|
return Either.right(Unit.INSTANCE);
|
||||||
}
|
}
|
||||||
@@ -1545,12 +1657,24 @@
|
@@ -1545,12 +1661,24 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startFallFlying() {
|
public void startFallFlying() {
|
||||||
@ -415,7 +427,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1664,11 +1788,30 @@
|
@@ -1664,11 +1792,30 @@
|
||||||
public int getXpNeededForNextLevel() {
|
public int getXpNeededForNextLevel() {
|
||||||
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
|
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
|
||||||
}
|
}
|
||||||
@ -447,7 +459,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1748,13 +1891,20 @@
|
@@ -1748,13 +1895,20 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setItemSlot(EquipmentSlot slot, ItemStack stack) {
|
public void setItemSlot(EquipmentSlot slot, ItemStack stack) {
|
||||||
@ -475,7 +487,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1798,26 +1948,55 @@
|
@@ -1798,26 +1952,55 @@
|
||||||
|
|
||||||
public void removeEntitiesOnShoulder() {
|
public void removeEntitiesOnShoulder() {
|
||||||
if (this.timeEntitySatOnShoulder + 20L < this.level().getGameTime()) {
|
if (this.timeEntitySatOnShoulder + 20L < this.level().getGameTime()) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren