mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-24 00:51:34 +01:00
Merge pull request #162 from RinesThaix/projectilesGravity
Fixing projectiles gravity
This commit is contained in:
commit
9ea34fb668
@ -31,12 +31,14 @@ public class EntityProjectile extends Entity {
|
|||||||
public EntityProjectile(@Nullable Entity shooter, @NotNull EntityType entityType) {
|
public EntityProjectile(@Nullable Entity shooter, @NotNull EntityType entityType) {
|
||||||
super(entityType);
|
super(entityType);
|
||||||
this.shooter = shooter;
|
this.shooter = shooter;
|
||||||
|
setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public EntityProjectile(@Nullable Entity shooter, @NotNull EntityType entityType, @NotNull Position spawnPosition) {
|
public EntityProjectile(@Nullable Entity shooter, @NotNull EntityType entityType, @NotNull Position spawnPosition) {
|
||||||
super(entityType, spawnPosition);
|
super(entityType, spawnPosition);
|
||||||
this.shooter = shooter;
|
this.shooter = shooter;
|
||||||
|
setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setup() {
|
private void setup() {
|
||||||
@ -44,7 +46,7 @@ public class EntityProjectile extends Entity {
|
|||||||
if (getEntityMeta() instanceof ProjectileMeta) {
|
if (getEntityMeta() instanceof ProjectileMeta) {
|
||||||
((ProjectileMeta) getEntityMeta()).setShooter(this.shooter);
|
((ProjectileMeta) getEntityMeta()).setShooter(this.shooter);
|
||||||
}
|
}
|
||||||
setBoundingBox(.5F, .5F, .5F);
|
setGravity(0.02f, 0.04f, 1.96f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
Loading…
Reference in New Issue
Block a user