mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
Disable vertical air friction when item entities have friction disabled (#10369)
This commit is contained in:
parent
b6a760757a
commit
7f488e6d9d
1 changed files with 5 additions and 0 deletions
|
@ -79,6 +79,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
f1 = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F;
|
||||
}
|
||||
|
||||
- this.setDeltaMovement(this.getDeltaMovement().multiply((double) f1, 0.98D, (double) f1));
|
||||
+ this.setDeltaMovement(this.getDeltaMovement().multiply((double) f1, frictionState == net.kyori.adventure.util.TriState.FALSE ? 1D : 0.98D, (double) f1)); // Paper - Friction API
|
||||
if (this.onGround()) {
|
||||
Vec3 vec3d1 = this.getDeltaMovement();
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue