Add proper attached blocks API to AbstractArrow (#12099)

This commit is contained in:
Tamion
2025-02-12 23:13:07 +01:00
committed by GitHub
parent cf7c6c7483
commit 072a8317b2
3 changed files with 38 additions and 6 deletions

View File

@@ -77,7 +77,7 @@
this.hasImpulse = true;
if (this.getPierceLevel() > 0 && projectileDeflection == ProjectileDeflection.NONE) {
continue;
@@ -313,6 +_,19 @@
@@ -313,13 +_,26 @@
}
}
@@ -97,6 +97,14 @@
@Override
protected double getDefaultGravity() {
return 0.05;
}
private boolean shouldFall() {
- return this.isInGround() && this.level().noCollision(new AABB(this.position(), this.position()).inflate(0.06));
+ return this.isInGround() && this.level().noCollision(new AABB(this.position(), this.position()).inflate(0.06)); // Paper - getAttachedBlocks api; diff on change
}
private void startFalling() {
@@ -329,7 +_,7 @@
this.life = 0;
}