优化火炮
This commit is contained in:
parent
30f060320c
commit
bf09f6f667
3 changed files with 19 additions and 28 deletions
|
@ -176,6 +176,7 @@ public class AnnihilatorEntity extends EnergyVehicleEntity implements GeoEntity,
|
|||
entityData.set(PITCH, Mth.wrapDegrees((float) (-(Mth.atan2(d1, d3) * 57.2957763671875))));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void positionRider(@NotNull Entity passenger, @NotNull MoveFunction callback) {
|
||||
if (!this.hasPassenger(passenger)) {
|
||||
|
@ -193,11 +194,6 @@ public class AnnihilatorEntity extends EnergyVehicleEntity implements GeoEntity,
|
|||
callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Vec3 getPassengerRidingPosition(@NotNull Entity entity) {
|
||||
return super.getPassengerRidingPosition(entity).add(0, 0.75, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DamageModifier getDamageModifier() {
|
||||
return super.getDamageModifier()
|
||||
|
|
|
@ -168,23 +168,6 @@ public class Mk42Entity extends VehicleEntity implements GeoEntity, CannonEntity
|
|||
entityData.set(YAW, Mth.wrapDegrees((float) (Mth.atan2(d2, d0) * 57.2957763671875) - 90.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void positionRider(@NotNull Entity passenger, @NotNull MoveFunction callback) {
|
||||
if (!this.hasPassenger(passenger)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Matrix4f transform = getVehicleFlatTransform(1);
|
||||
|
||||
float x = 0f;
|
||||
float y = 2.3f;
|
||||
float z = 0f;
|
||||
|
||||
Vector4f worldPosition = transformPosition(transform, x, y, z);
|
||||
passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z);
|
||||
callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DamageModifier getDamageModifier() {
|
||||
return super.getDamageModifier()
|
||||
|
@ -271,6 +254,23 @@ public class Mk42Entity extends VehicleEntity implements GeoEntity, CannonEntity
|
|||
this.discard();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void positionRider(@NotNull Entity passenger, @NotNull MoveFunction callback) {
|
||||
if (!this.hasPassenger(passenger)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Matrix4f transform = getVehicleFlatTransform(1);
|
||||
|
||||
float x = 0f;
|
||||
float y = 2.3f;
|
||||
float z = 0f;
|
||||
|
||||
Vector4f worldPosition = transformPosition(transform, x, y, z);
|
||||
passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z);
|
||||
callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void vehicleShoot(Player player, int type) {
|
||||
if (this.entityData.get(COOL_DOWN) > 0) return;
|
||||
|
|
|
@ -176,7 +176,7 @@ public class Mle1934Entity extends VehicleEntity implements GeoEntity, CannonEnt
|
|||
return 2.16F;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public void positionRider(@NotNull Entity passenger, @NotNull MoveFunction callback) {
|
||||
if (!this.hasPassenger(passenger)) {
|
||||
return;
|
||||
|
@ -193,11 +193,6 @@ public class Mle1934Entity extends VehicleEntity implements GeoEntity, CannonEnt
|
|||
callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public @NotNull Vec3 getPassengerRidingPosition(@NotNull Entity entity) {
|
||||
return super.getPassengerRidingPosition(entity).add(0, -0.075, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DamageModifier getDamageModifier() {
|
||||
return super.getDamageModifier()
|
||||
|
|
Loading…
Add table
Reference in a new issue