为充电站数据添加配置项
This commit is contained in:
parent
600a7c55b5
commit
8f4e5ac252
2 changed files with 29 additions and 7 deletions
|
@ -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<ItemStack> 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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue