mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-23 08:59:27 +00:00
perf(entity): 优化投射物发包过多
This commit is contained in:
@@ -6,6 +6,7 @@ public abstract class AbstractCustomProjectile implements CustomProjectile {
|
||||
protected final ProjectileMeta meta;
|
||||
protected final Projectile projectile;
|
||||
protected final Item<?> item;
|
||||
private int inGroundTime;
|
||||
|
||||
protected AbstractCustomProjectile(ProjectileMeta meta, Projectile projectile, Item<?> item) {
|
||||
this.meta = meta;
|
||||
@@ -27,4 +28,14 @@ public abstract class AbstractCustomProjectile implements CustomProjectile {
|
||||
public Item<?> item() {
|
||||
return item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int inGroundTime() {
|
||||
return inGroundTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInGroundTime(int inGroundTime) {
|
||||
this.inGroundTime = inGroundTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,8 @@ public interface CustomProjectile {
|
||||
Projectile projectile();
|
||||
|
||||
Item<?> item();
|
||||
|
||||
int inGroundTime();
|
||||
|
||||
void setInGroundTime(int inGroundTime);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user