diff --git a/src/main/java/com/atsuishio/superbwarfare/block/entity/ChargingStationBlockEntity.java b/src/main/java/com/atsuishio/superbwarfare/block/entity/ChargingStationBlockEntity.java index 3437e5b84..6e0e4050f 100644 --- a/src/main/java/com/atsuishio/superbwarfare/block/entity/ChargingStationBlockEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/block/entity/ChargingStationBlockEntity.java @@ -2,6 +2,7 @@ package com.atsuishio.superbwarfare.block.entity; import com.atsuishio.superbwarfare.block.ChargingStationBlock; import com.atsuishio.superbwarfare.component.ModDataComponents; +import com.atsuishio.superbwarfare.config.server.MiscConfig; import com.atsuishio.superbwarfare.init.ModBlockEntities; import com.atsuishio.superbwarfare.menu.ChargingStationMenu; import com.atsuishio.superbwarfare.network.dataslot.ContainerEnergyData; @@ -47,16 +48,15 @@ public class ChargingStationBlockEntity extends BlockEntity implements WorldlyCo protected static final int SLOT_FUEL = 0; protected static final int SLOT_CHARGE = 1; - - public static final int MAX_ENERGY = 4000000; public static final int MAX_DATA_COUNT = 4; - public static final int DEFAULT_FUEL_TIME = 1600; - public static final int CHARGE_SPEED = 128; - public static final int CHARGE_OTHER_SPEED = 100000; - public static final int CHARGE_RADIUS = 8; - protected NonNullList items = NonNullList.withSize(2, ItemStack.EMPTY); + public static final int MAX_ENERGY = MiscConfig.CHARGING_STATION_MAX_ENERGY.get(); + public static final int DEFAULT_FUEL_TIME = MiscConfig.CHARGING_STATION_DEFAULT_FUEL_TIME.get(); + public static final int CHARGE_SPEED = MiscConfig.CHARGING_STATION_GENERATE_SPEED.get(); + public static final int CHARGE_OTHER_SPEED = MiscConfig.CHARGING_STATION_TRANSFER_SPEED.get(); + public static final int CHARGE_RADIUS = MiscConfig.CHARGING_STATION_CHARGE_RADIUS.get(); + public int fuelTick = 0; public int maxFuelTick = DEFAULT_FUEL_TIME; diff --git a/src/main/java/com/atsuishio/superbwarfare/config/server/MiscConfig.java b/src/main/java/com/atsuishio/superbwarfare/config/server/MiscConfig.java index 4cfe5c48b..db48cf103 100644 --- a/src/main/java/com/atsuishio/superbwarfare/config/server/MiscConfig.java +++ b/src/main/java/com/atsuishio/superbwarfare/config/server/MiscConfig.java @@ -10,6 +10,13 @@ public class MiscConfig { public static ModConfigSpec.IntValue MILITARY_ARMOR_LEVEL; public static ModConfigSpec.IntValue HEAVY_MILITARY_ARMOR_LEVEL; public static ModConfigSpec.IntValue ARMOR_PONT_PER_LEVEL; + public static ModConfigSpec.IntValue CHARGING_STATION_MAX_ENERGY; + public static ModConfigSpec.IntValue CHARGING_STATION_GENERATE_SPEED; + public static ModConfigSpec.IntValue CHARGING_STATION_TRANSFER_SPEED; + public static ModConfigSpec.IntValue CHARGING_STATION_CHARGE_RADIUS; + + // TODO 这玩意是个啥 + public static ModConfigSpec.IntValue CHARGING_STATION_DEFAULT_FUEL_TIME; public static void init(ModConfigSpec.Builder builder) { builder.push("misc"); @@ -32,6 +39,21 @@ public class MiscConfig { builder.comment("The points per level for armor plate"); ARMOR_PONT_PER_LEVEL = builder.defineInRange("armor_point_per_level", 15, 0, 10000000); + builder.comment("Max energy storage of charging station"); + CHARGING_STATION_MAX_ENERGY = builder.defineInRange("charging_station_max_energy", 4000000, 1, Integer.MAX_VALUE); + + builder.comment("How much FE energy can charging station generate per tick"); + CHARGING_STATION_GENERATE_SPEED = builder.defineInRange("charging_station_generate_speed", 128, 1, Integer.MAX_VALUE); + + builder.comment("How much FE energy can charging station transfer per tick"); + CHARGING_STATION_TRANSFER_SPEED = builder.defineInRange("charging_station_transfer_speed", 100000, 1, Integer.MAX_VALUE); + + builder.comment("The charging radius of the charging station"); + CHARGING_STATION_CHARGE_RADIUS = builder.defineInRange("charging_station_charge_radius", 8, 0, 128); + + builder.comment("What is this?"); + CHARGING_STATION_DEFAULT_FUEL_TIME = builder.defineInRange("charging_station_default_fuel_time", 1600, 1, Integer.MAX_VALUE); + builder.pop(); } }