Merge pull request #162 from RinesThaix/projectilesGravity

Fixing projectiles gravity
This commit is contained in:
TheMode 2021-03-07 15:09:47 +01:00 committed by GitHub
commit 9ea34fb668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,12 +31,14 @@ public class EntityProjectile extends Entity {
public EntityProjectile(@Nullable Entity shooter, @NotNull EntityType entityType) {
super(entityType);
this.shooter = shooter;
setup();
}
@Deprecated
public EntityProjectile(@Nullable Entity shooter, @NotNull EntityType entityType, @NotNull Position spawnPosition) {
super(entityType, spawnPosition);
this.shooter = shooter;
setup();
}
private void setup() {
@ -44,7 +46,7 @@ public class EntityProjectile extends Entity {
if (getEntityMeta() instanceof ProjectileMeta) {
((ProjectileMeta) getEntityMeta()).setShooter(this.shooter);
}
setBoundingBox(.5F, .5F, .5F);
setGravity(0.02f, 0.04f, 1.96f);
}
@Nullable