修复A10坠机速度,改版本号
This commit is contained in:
parent
02277c556d
commit
e4b0228d45
2 changed files with 64 additions and 76 deletions
|
@ -16,7 +16,7 @@ mod_id=superbwarfare
|
||||||
mod_name=Superb Warfare
|
mod_name=Superb Warfare
|
||||||
mod_license=GNU General Public License v3.0
|
mod_license=GNU General Public License v3.0
|
||||||
mod_description=A Warfare Mod
|
mod_description=A Warfare Mod
|
||||||
mod_version=0.7.6
|
mod_version=0.8.0
|
||||||
mod_authors=Atsuishio, Roki27, Light_Quanta
|
mod_authors=Atsuishio, Roki27, Light_Quanta
|
||||||
# dependencies
|
# dependencies
|
||||||
jei_version=19.21.0.247
|
jei_version=19.21.0.247
|
||||||
|
|
|
@ -264,8 +264,6 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
}
|
}
|
||||||
if (onGround()) {
|
if (onGround()) {
|
||||||
terrainCompactA10();
|
terrainCompactA10();
|
||||||
} else {
|
|
||||||
this.setZRot(this.roll * 0.98f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entityData.get(FIRE_TIME) > 0) {
|
if (entityData.get(FIRE_TIME) > 0) {
|
||||||
|
@ -367,20 +365,6 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
p3 = new Vec3(positionRB.x, p3y, positionRB.z);
|
p3 = new Vec3(positionRB.x, p3y, positionRB.z);
|
||||||
Vec3 p4 = p2.add(p3).scale(0.5);
|
Vec3 p4 = p2.add(p3).scale(0.5);
|
||||||
|
|
||||||
// // 测试用粒子效果,用于确定点位位置
|
|
||||||
//
|
|
||||||
// List<Entity> entities = getPlayer(level());
|
|
||||||
// for (var e : entities) {
|
|
||||||
// if (e instanceof ServerPlayer player) {
|
|
||||||
// if (player.level() instanceof ServerLevel serverLevel) {
|
|
||||||
// sendParticle(serverLevel, ParticleTypes.END_ROD, p1.x, p1.y, p1.z, 1, 0, 0, 0, 0, true);
|
|
||||||
// sendParticle(serverLevel, ParticleTypes.END_ROD, p2.x, p2.y, p2.z, 1, 0, 0, 0, 0, true);
|
|
||||||
// sendParticle(serverLevel, ParticleTypes.END_ROD, p3.x, p3.y, p3.z, 1, 0, 0, 0, 0, true);
|
|
||||||
// sendParticle(serverLevel, ParticleTypes.END_ROD, p4.x, p4.y, p4.z, 1, 0, 0, 0, 0, true);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 通过点位位置获取角度
|
// 通过点位位置获取角度
|
||||||
|
|
||||||
// 左后-右后
|
// 左后-右后
|
||||||
|
@ -505,7 +489,6 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
float diffY = 0;
|
float diffY = 0;
|
||||||
|
|
||||||
if (getHealth() > 0.1f * getMaxHealth()) {
|
if (getHealth() > 0.1f * getMaxHealth()) {
|
||||||
|
|
||||||
if (passenger == null || isInWater()) {
|
if (passenger == null || isInWater()) {
|
||||||
this.leftInputDown = false;
|
this.leftInputDown = false;
|
||||||
this.rightInputDown = false;
|
this.rightInputDown = false;
|
||||||
|
@ -551,19 +534,6 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
diffY = Mth.clamp(Mth.wrapDegrees(passenger.getYHeadRot() - this.getYRot()), -90f, 90f);
|
diffY = Mth.clamp(Mth.wrapDegrees(passenger.getYHeadRot() - this.getYRot()), -90f, 90f);
|
||||||
diffX = Mth.clamp(Mth.wrapDegrees(passenger.getXRot() - this.getXRot()), -90f, 90f);
|
diffX = Mth.clamp(Mth.wrapDegrees(passenger.getXRot() - this.getXRot()), -90f, 90f);
|
||||||
}
|
}
|
||||||
} else if (!onGround()) {
|
|
||||||
this.entityData.set(POWER, Math.max(this.entityData.get(POWER) - 0.0003f, 0.02f));
|
|
||||||
destroyRot += 0.1f;
|
|
||||||
diffX = 90 - this.getXRot();
|
|
||||||
this.setXRot(this.getXRot() + diffX * 0.0015f * destroyRot);
|
|
||||||
this.setZRot(this.getRoll() - destroyRot);
|
|
||||||
setDeltaMovement(getDeltaMovement().add(0, -0.03, 0));
|
|
||||||
setDeltaMovement(getDeltaMovement().add(0, -destroyRot * 0.005, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.entityData.set(POWER, this.entityData.get(POWER) * 0.99f);
|
|
||||||
this.entityData.set(DELTA_ROT, this.entityData.get(DELTA_ROT) * 0.85f);
|
|
||||||
this.entityData.set(PLANE_BREAK, this.entityData.get(PLANE_BREAK) * 0.8f);
|
|
||||||
|
|
||||||
if (getEnergy() > 0 && !this.level().isClientSide) {
|
if (getEnergy() > 0 && !this.level().isClientSide) {
|
||||||
this.consumeEnergy((int) (Mth.abs(this.entityData.get(POWER)) * VehicleConfig.A_10_MAX_ENERGY_COST.get()));
|
this.consumeEnergy((int) (Mth.abs(this.entityData.get(POWER)) * VehicleConfig.A_10_MAX_ENERGY_COST.get()));
|
||||||
|
@ -583,6 +553,10 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
this.setZRot(this.getRoll() - addZ * (1 - Mth.abs(i)));
|
this.setZRot(this.getRoll() - addZ * (1 - Mth.abs(i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!onGround()) {
|
||||||
|
this.setZRot(this.roll * 0.98f);
|
||||||
|
}
|
||||||
|
|
||||||
this.setPropellerRot(this.getPropellerRot() + 30 * this.entityData.get(POWER));
|
this.setPropellerRot(this.getPropellerRot() + 30 * this.entityData.get(POWER));
|
||||||
|
|
||||||
// 起落架
|
// 起落架
|
||||||
|
@ -622,6 +596,20 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
|
|
||||||
setFlap3Rot(flapY * 5);
|
setFlap3Rot(flapY * 5);
|
||||||
|
|
||||||
|
} else if (!onGround()) {
|
||||||
|
this.entityData.set(POWER, Math.max(this.entityData.get(POWER) - 0.0003f, 0.02f));
|
||||||
|
destroyRot += 0.1f;
|
||||||
|
diffX = 90 - this.getXRot();
|
||||||
|
this.setXRot(this.getXRot() + diffX * 0.001f * destroyRot);
|
||||||
|
this.setZRot(this.getRoll() - destroyRot);
|
||||||
|
setDeltaMovement(getDeltaMovement().add(0, -0.03, 0));
|
||||||
|
setDeltaMovement(getDeltaMovement().add(0, -destroyRot * 0.005, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.entityData.set(POWER, this.entityData.get(POWER) * 0.99f);
|
||||||
|
this.entityData.set(DELTA_ROT, this.entityData.get(DELTA_ROT) * 0.85f);
|
||||||
|
this.entityData.set(PLANE_BREAK, this.entityData.get(PLANE_BREAK) * 0.8f);
|
||||||
|
|
||||||
Matrix4f transform = getVehicleTransform(1);
|
Matrix4f transform = getVehicleTransform(1);
|
||||||
double flapAngle = (getFlap1LRot() + getFlap1RRot() + getFlap1L2Rot() + getFlap1R2Rot()) / 4;
|
double flapAngle = (getFlap1LRot() + getFlap1RRot() + getFlap1L2Rot() + getFlap1R2Rot()) / 4;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue