From ea09e165b2475eac004a87201798526b294a6283 Mon Sep 17 00:00:00 2001 From: Atsuihsio <842960157@qq.com> Date: Wed, 5 Mar 2025 21:25:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=83=A8=E5=88=86=E6=95=B0?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../client/model/entity/ProjectileEntityModel.java | 3 +-- .../entity/vehicle/SpeedboatEntity.java | 4 ++-- .../superbwarfare/entity/vehicle/Yx100Entity.java | 14 +++++++------- .../superbwarfare/mixins/CameraMixin.java | 4 ++-- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/client/model/entity/ProjectileEntityModel.java b/src/main/java/com/atsuishio/superbwarfare/client/model/entity/ProjectileEntityModel.java index 6963dafe3..7a5602181 100644 --- a/src/main/java/com/atsuishio/superbwarfare/client/model/entity/ProjectileEntityModel.java +++ b/src/main/java/com/atsuishio/superbwarfare/client/model/entity/ProjectileEntityModel.java @@ -5,7 +5,6 @@ import com.atsuishio.superbwarfare.entity.projectile.ProjectileEntity; import com.atsuishio.superbwarfare.entity.vehicle.base.ArmedVehicleEntity; import com.atsuishio.superbwarfare.event.ClientEventHandler; import com.atsuishio.superbwarfare.init.ModItems; -import com.atsuishio.superbwarfare.init.ModTags; import net.minecraft.client.Minecraft; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; @@ -31,7 +30,7 @@ public class ProjectileEntityModel extends GeoModel { || player.getMainHandItem().is(ModItems.GLOCK_17.get()) || player.getMainHandItem().is(ModItems.GLOCK_18.get()) || player.getMainHandItem().is(ModItems.BOCEK.get()) - || (player.getVehicle() instanceof ArmedVehicleEntity iVehicle && iVehicle.isDriver(player) && !player.getMainHandItem().is(ModTags.Items.GUN))) { + || (player.getVehicle() instanceof ArmedVehicleEntity)) { return ModUtils.loc("geo/projectile_entity.geo.json"); } else { return ModUtils.loc("geo/projectile_entity2.geo.json"); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java index 552739797..d4f579b00 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/SpeedboatEntity.java @@ -234,7 +234,7 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo .headShot(2f) .zoom(false); - projectile.bypassArmorRate(1f); + projectile.bypassArmorRate(0.4f); projectile.setPos(this.xo - this.getViewVector(1).scale(0.54).x - this.getDeltaMovement().x, this.yo + 3.0, this.zo - this.getViewVector(1).scale(0.54).z - this.getDeltaMovement().z); projectile.shoot(player, player.getLookAngle().x, player.getLookAngle().y + (zooming() ? 0.002f : -0.009f), player.getLookAngle().z, 20, (float) 0.4); @@ -259,7 +259,7 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo } } - this.entityData.set(HEAT, this.entityData.get(HEAT) + 3); + this.entityData.set(HEAT, this.entityData.get(HEAT) + 4); this.entityData.set(FIRE_ANIM, 3); boolean hasCreativeAmmo = player.getInventory().hasAnyMatching(s -> s.is(ModItems.CREATIVE_AMMO_BOX.get())); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java index 889fa35fe..d7a635e0d 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/Yx100Entity.java @@ -166,7 +166,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti .multiply(0.15f, ModDamageTypes.PROJECTILE_BOOM) .multiply(0.1f, ModDamageTypes.MINE) .multiply(0.1f, ModDamageTypes.LUNGE_MINE) - .multiply(0.17f, ModDamageTypes.CANNON_FIRE) + .multiply(0.19f, ModDamageTypes.CANNON_FIRE) .multiply(0.03f, ModTags.DamageTypes.PROJECTILE_ABSOLUTE) .reduce(9); } @@ -437,7 +437,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti if (this.cannotFire) return; Matrix4f transform = getGunTransform(); - Vector4f worldPosition = transformPosition(transform, 0, 0, 0); + Vector4f worldPosition = transformPosition(transform, 0, -0.2f, 0); ProjectileEntity projectile = new ProjectileEntity(player.level()) .shooter(player) @@ -445,7 +445,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti .headShot(2f) .zoom(false); - projectile.bypassArmorRate(1f); + projectile.bypassArmorRate(0.4f); projectile.setPos(worldPosition.x - 1.1 * this.getDeltaMovement().x, worldPosition.y, worldPosition.z - 1.1 * this.getDeltaMovement().z); projectile.shoot(getGunVector(1).x, getGunVector(1).y + 0.005f, getGunVector(1).z, 20, 0.02f); this.level().addFreshEntity(projectile); @@ -461,7 +461,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti } this.entityData.set(FIRE_TIME, 2); - this.entityData.set(MACHINE_GUN_HEAT, this.entityData.get(MACHINE_GUN_HEAT) + 3); + this.entityData.set(MACHINE_GUN_HEAT, this.entityData.get(MACHINE_GUN_HEAT) + 4); Level level = player.level(); final Vec3 center = new Vec3(this.getX(), this.getEyeY(), this.getZ()); @@ -737,11 +737,11 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti int i = this.getOrderedPassengers().indexOf(passenger); if (i == 0) { - Vector4f worldPosition = transformPosition(transform, 0.8669625f, 0.2f, 0.6076875f); + Vector4f worldPosition = transformPosition(transform, 0.8669625f, -1.3f, 0.6076875f); passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z); callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z); } else if (i == 1) { - Vector4f worldPosition = transformPosition(transform, -0.87890625f, 0.5f, -0.6640625f); + Vector4f worldPosition = transformPosition(transform, -0.87890625f, -1f, -0.6640625f); passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z); callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z); } @@ -894,7 +894,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti } if (player == getNthEntity(1)) { - return 600; + return 500; } return 15; } diff --git a/src/main/java/com/atsuishio/superbwarfare/mixins/CameraMixin.java b/src/main/java/com/atsuishio/superbwarfare/mixins/CameraMixin.java index b323e76ac..65ab45568 100644 --- a/src/main/java/com/atsuishio/superbwarfare/mixins/CameraMixin.java +++ b/src/main/java/com/atsuishio/superbwarfare/mixins/CameraMixin.java @@ -92,11 +92,11 @@ public abstract class CameraMixin { if (player.getVehicle() instanceof Yx100Entity yx100 && (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON || ClientEventHandler.zoomVehicle)) { if (yx100.getFirstPassenger() == player) { setRotation(-Mth.lerp(partialTicks, yx100.turretYRotO - yx100.yRotO, yx100.getTurretYRot() - yx100.getYRot()), Mth.lerp(partialTicks, yx100.turretXRotO - yx100.xRotO, yx100.getTurretXRot() - yx100.getXRot())); - setPosition(Mth.lerp(partialTicks, player.xo, player.getX()), Mth.lerp(partialTicks, player.yo + player.getEyeHeight(), player.getEyeY()), Mth.lerp(partialTicks, player.zo, player.getZ())); + setPosition(Mth.lerp(partialTicks, player.xo, player.getX()), Mth.lerp(partialTicks, player.yo + player.getEyeHeight() + 1.5, player.getEyeY() + 1.5), Mth.lerp(partialTicks, player.zo, player.getZ())); info.cancel(); } else if (yx100.getNthEntity(1) == player) { setRotation(-Mth.lerp(partialTicks, yx100.gunYRotO - yx100.yRotO, yx100.getGunYRot() - yx100.getYRot()), Mth.lerp(partialTicks, yx100.gunXRotO - yx100.xRotO, yx100.getGunXRot() - yx100.getXRot())); - setPosition(Mth.lerp(partialTicks, player.xo, player.getX()), Mth.lerp(partialTicks, player.yo + player.getEyeHeight(), player.getEyeY()), Mth.lerp(partialTicks, player.zo, player.getZ())); + setPosition(Mth.lerp(partialTicks, player.xo, player.getX()), Mth.lerp(partialTicks, player.yo + player.getEyeHeight() + 1.5, player.getEyeY() + 1.5), Mth.lerp(partialTicks, player.zo, player.getZ())); info.cancel(); } return;