调整部分数值
This commit is contained in:
parent
d6cbba6f54
commit
ea09e165b2
4 changed files with 12 additions and 13 deletions
|
@ -5,7 +5,6 @@ import com.atsuishio.superbwarfare.entity.projectile.ProjectileEntity;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.base.ArmedVehicleEntity;
|
import com.atsuishio.superbwarfare.entity.vehicle.base.ArmedVehicleEntity;
|
||||||
import com.atsuishio.superbwarfare.event.ClientEventHandler;
|
import com.atsuishio.superbwarfare.event.ClientEventHandler;
|
||||||
import com.atsuishio.superbwarfare.init.ModItems;
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import com.atsuishio.superbwarfare.init.ModTags;
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
@ -31,7 +30,7 @@ public class ProjectileEntityModel extends GeoModel<ProjectileEntity> {
|
||||||
|| player.getMainHandItem().is(ModItems.GLOCK_17.get())
|
|| player.getMainHandItem().is(ModItems.GLOCK_17.get())
|
||||||
|| player.getMainHandItem().is(ModItems.GLOCK_18.get())
|
|| player.getMainHandItem().is(ModItems.GLOCK_18.get())
|
||||||
|| player.getMainHandItem().is(ModItems.BOCEK.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");
|
return ModUtils.loc("geo/projectile_entity.geo.json");
|
||||||
} else {
|
} else {
|
||||||
return ModUtils.loc("geo/projectile_entity2.geo.json");
|
return ModUtils.loc("geo/projectile_entity2.geo.json");
|
||||||
|
|
|
@ -234,7 +234,7 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo
|
||||||
.headShot(2f)
|
.headShot(2f)
|
||||||
.zoom(false);
|
.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.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,
|
projectile.shoot(player, player.getLookAngle().x, player.getLookAngle().y + (zooming() ? 0.002f : -0.009f), player.getLookAngle().z, 20,
|
||||||
(float) 0.4);
|
(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);
|
this.entityData.set(FIRE_ANIM, 3);
|
||||||
|
|
||||||
boolean hasCreativeAmmo = player.getInventory().hasAnyMatching(s -> s.is(ModItems.CREATIVE_AMMO_BOX.get()));
|
boolean hasCreativeAmmo = player.getInventory().hasAnyMatching(s -> s.is(ModItems.CREATIVE_AMMO_BOX.get()));
|
||||||
|
|
|
@ -166,7 +166,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
||||||
.multiply(0.15f, ModDamageTypes.PROJECTILE_BOOM)
|
.multiply(0.15f, ModDamageTypes.PROJECTILE_BOOM)
|
||||||
.multiply(0.1f, ModDamageTypes.MINE)
|
.multiply(0.1f, ModDamageTypes.MINE)
|
||||||
.multiply(0.1f, ModDamageTypes.LUNGE_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)
|
.multiply(0.03f, ModTags.DamageTypes.PROJECTILE_ABSOLUTE)
|
||||||
.reduce(9);
|
.reduce(9);
|
||||||
}
|
}
|
||||||
|
@ -437,7 +437,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
||||||
if (this.cannotFire) return;
|
if (this.cannotFire) return;
|
||||||
|
|
||||||
Matrix4f transform = getGunTransform();
|
Matrix4f transform = getGunTransform();
|
||||||
Vector4f worldPosition = transformPosition(transform, 0, 0, 0);
|
Vector4f worldPosition = transformPosition(transform, 0, -0.2f, 0);
|
||||||
|
|
||||||
ProjectileEntity projectile = new ProjectileEntity(player.level())
|
ProjectileEntity projectile = new ProjectileEntity(player.level())
|
||||||
.shooter(player)
|
.shooter(player)
|
||||||
|
@ -445,7 +445,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
||||||
.headShot(2f)
|
.headShot(2f)
|
||||||
.zoom(false);
|
.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.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);
|
projectile.shoot(getGunVector(1).x, getGunVector(1).y + 0.005f, getGunVector(1).z, 20, 0.02f);
|
||||||
this.level().addFreshEntity(projectile);
|
this.level().addFreshEntity(projectile);
|
||||||
|
@ -461,7 +461,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
||||||
}
|
}
|
||||||
|
|
||||||
this.entityData.set(FIRE_TIME, 2);
|
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();
|
Level level = player.level();
|
||||||
final Vec3 center = new Vec3(this.getX(), this.getEyeY(), this.getZ());
|
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);
|
int i = this.getOrderedPassengers().indexOf(passenger);
|
||||||
|
|
||||||
if (i == 0) {
|
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);
|
passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z);
|
||||||
callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z);
|
callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z);
|
||||||
} else if (i == 1) {
|
} 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);
|
passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z);
|
||||||
callback.accept(passenger, 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)) {
|
if (player == getNthEntity(1)) {
|
||||||
return 600;
|
return 500;
|
||||||
}
|
}
|
||||||
return 15;
|
return 15;
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,11 +92,11 @@ public abstract class CameraMixin {
|
||||||
if (player.getVehicle() instanceof Yx100Entity yx100 && (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON || ClientEventHandler.zoomVehicle)) {
|
if (player.getVehicle() instanceof Yx100Entity yx100 && (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON || ClientEventHandler.zoomVehicle)) {
|
||||||
if (yx100.getFirstPassenger() == player) {
|
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()));
|
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();
|
info.cancel();
|
||||||
} else if (yx100.getNthEntity(1) == player) {
|
} 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()));
|
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();
|
info.cancel();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue