移除部分config

This commit is contained in:
17146 2025-07-01 21:27:45 +08:00 committed by Light_Quanta
parent ba147903dd
commit f852530a40
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959
2 changed files with 2 additions and 36 deletions

View file

@ -16,11 +16,8 @@ public class ExplosionConfig {
public static ModConfigSpec.IntValue MORTAR_SHELL_EXPLOSION_DAMAGE;
public static ModConfigSpec.IntValue MORTAR_SHELL_EXPLOSION_RADIUS;
public static ModConfigSpec.IntValue DRONE_KAMIKAZE_HIT_DAMAGE;
public static ModConfigSpec.IntValue DRONE_KAMIKAZE_EXPLOSION_DAMAGE;
public static ModConfigSpec.IntValue DRONE_KAMIKAZE_EXPLOSION_RADIUS;
public static ModConfigSpec.IntValue DRONE_KAMIKAZE_HIT_DAMAGE_C4;
public static ModConfigSpec.IntValue DRONE_KAMIKAZE_HIT_DAMAGE_RPG;
public static ModConfigSpec.IntValue C4_EXPLOSION_COUNTDOWN;
public static ModConfigSpec.IntValue C4_EXPLOSION_DAMAGE;
@ -32,7 +29,7 @@ public class ExplosionConfig {
public static ModConfigSpec.IntValue WIRE_GUIDE_MISSILE_DAMAGE;
public static ModConfigSpec.IntValue WIRE_GUIDE_MISSILE_EXPLOSION_DAMAGE;
public static ModConfigSpec.IntValue WIRE_GUIDE_MISSILE_EXPLOSION_RADIUS;
public static ModConfigSpec.IntValue AGM_65_DAMAGE;
public static ModConfigSpec.IntValue AGM_65_EXPLOSION_DAMAGE;
public static ModConfigSpec.DoubleValue AGM_65_EXPLOSION_RADIUS;
@ -83,22 +80,12 @@ public class ExplosionConfig {
builder.push("Drone Kamikaze");
builder.comment("The hit damage of Drone Kamikaze");
DRONE_KAMIKAZE_HIT_DAMAGE = builder.defineInRange("drone_kamikaze_hit_damage", 200, 1, 10000000);
builder.comment("The hit damage of Drone Kamikaze with C4");
DRONE_KAMIKAZE_HIT_DAMAGE_C4 = builder.defineInRange("drone_kamikaze_hit_damage_c4", 150, 1, 10000000);
builder.comment("The hit damage of Drone Kamikaze with RPG");
DRONE_KAMIKAZE_HIT_DAMAGE_RPG = builder.defineInRange("drone_kamikaze_hit_damage_rpg", 270, 1, 10000000);
builder.comment("The explosion damage of Drone Kamikaze");
DRONE_KAMIKAZE_EXPLOSION_DAMAGE = builder.defineInRange("drone_kamikaze_explosion_damage", 160, 1, 10000000);
builder.comment("The explosion radius of Drone Kamikaze");
DRONE_KAMIKAZE_EXPLOSION_RADIUS = builder.defineInRange("drone_kamikaze_explosion_radius", 9, 1, 50);
builder.pop();
builder.push("C4");

View file

@ -501,7 +501,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
public void hitEntityCrash(Player player, Entity target) {
if (lastTickSpeed > 0.12) {
var attachedEntity = this.entityData.get(ATTACHED_ENTITY);
if (!attachedEntity.isEmpty() && 20 * lastTickSpeed > this.getHealth()) {
var data = CustomData.DRONE_ATTACHMENT.values().stream().filter(d -> attachedEntity.equals(d.entityID))
@ -515,27 +514,9 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
target.invulnerableTime = 0;
});
} else {
// TODO 非神风模式
target.hurt(ModDamageTypes.causeDroneHitDamage(this.level().registryAccess(), this, player), (float) (5 * lastTickSpeed));
}
}
}
// TODO 清理这一坨
if (this.entityData.get(KAMIKAZE_MODE) != 0 && 20 * lastTickSpeed > this.getHealth()) {
if (this.entityData.get(KAMIKAZE_MODE) == 1) {
var mortarShell = new MortarShellEntity(player, this.level());
target.hurt(ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), mortarShell, player), ExplosionConfig.DRONE_KAMIKAZE_HIT_DAMAGE.get());
target.invulnerableTime = 0;
}
// } else if (this.entityData.get(KAMIKAZE_MODE) == 2) {
// var c4 = new C4Entity(player, this.level());
// target.hurt(ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), c4, player), ExplosionConfig.DRONE_KAMIKAZE_HIT_DAMAGE_C4.get());
// target.invulnerableTime = 0;
// else if (this.entityData.get(KAMIKAZE_MODE) == 3) {
// var rpg = new RpgRocketEntity(player, this.level());
// target.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), rpg, player), ExplosionConfig.DRONE_KAMIKAZE_HIT_DAMAGE_RPG.get());
// target.invulnerableTime = 0;
// }
if (player != null && player.getMainHandItem().is(ModItems.MONITOR.get())) {
var stack = player.getMainHandItem();
@ -544,8 +525,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
NBTTool.saveTag(stack, tag);
}
}
target.hurt(ModDamageTypes.causeDroneHitDamage(this.level().registryAccess(), this, player), (float) (5 * lastTickSpeed));
this.hurt(new DamageSource(level().registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(DamageTypes.EXPLOSION), Objects.requireNonNullElse(player, this)), (float) (((this.entityData.get(KAMIKAZE_MODE) != 0) ? 20 : 4) * lastTickSpeed));
}
}