Skip to content

Commit

Permalink
rename converter configs back to euToFE from euToPlatformNative (#2387)
Browse files Browse the repository at this point in the history
  • Loading branch information
screret authored Nov 17, 2024
1 parent bcd85b4 commit 52561ba
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 47 deletions.
12 changes: 6 additions & 6 deletions src/generated/resources/assets/gtceu/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -2253,9 +2253,9 @@
"config.gtceu.option.dumpRecipes": "sǝdıɔǝᴚdɯnp",
"config.gtceu.option.enableCleanroom": "ɯooɹuɐǝןƆǝןqɐuǝ",
"config.gtceu.option.enableCompass": "ssɐdɯoƆǝןqɐuǝ",
"config.gtceu.option.enableFEConverters": "sɹǝʇɹǝʌuoƆƎℲǝןqɐuǝ",
"config.gtceu.option.enableMaintenance": "ǝɔuɐuǝʇuıɐWǝןqɐuǝ",
"config.gtceu.option.enableMoreDualHatchAbility": "ʎʇıןıqⱯɥɔʇɐHןɐnᗡǝɹoWǝןqɐuǝ",
"config.gtceu.option.enablePlatformConverters": "sɹǝʇɹǝʌuoƆɯɹoɟʇɐןԀǝןqɐuǝ",
"config.gtceu.option.enableResearch": "ɥɔɹɐǝsǝᴚǝןqɐuǝ",
"config.gtceu.option.enableTieredCasings": "sbuısɐƆpǝɹǝı⟘ǝןqɐuǝ",
"config.gtceu.option.enableWorldAccelerators": "sɹoʇɐɹǝןǝɔɔⱯpןɹoMǝןqɐuǝ",
Expand All @@ -2265,7 +2265,8 @@
"config.gtceu.option.energyUsageMultiplier": "ɹǝıןdıʇןnWǝbɐs∩ʎbɹǝuǝ",
"config.gtceu.option.environmentalHazardDecayRate": "ǝʇɐᴚʎɐɔǝᗡpɹɐzɐHןɐʇuǝɯuoɹıʌuǝ",
"config.gtceu.option.environmentalHazards": "spɹɐzɐHןɐʇuǝɯuoɹıʌuǝ",
"config.gtceu.option.euToPlatformRatio": "oıʇɐᴚɯɹoɟʇɐןԀo⟘nǝ",
"config.gtceu.option.euToFeRatio": "oıʇɐᴚǝℲo⟘nǝ",
"config.gtceu.option.feToEuRatio": "oıʇɐᴚnƎo⟘ǝɟ",
"config.gtceu.option.flintAndSteelRequireSteel": "ןǝǝʇSǝɹınbǝᴚןǝǝʇSpuⱯʇuıןɟ",
"config.gtceu.option.gameplay": "ʎɐןdǝɯɐb",
"config.gtceu.option.generateLowQualityGems": "sɯǝ⅁ʎʇıןɐnὉʍoꞀǝʇɐɹǝuǝb",
Expand All @@ -2286,8 +2287,8 @@
"config.gtceu.option.harderRods": "spoᴚɹǝpɹɐɥ",
"config.gtceu.option.harmlessActiveTransformers": "sɹǝɯɹoɟsuɐɹ⟘ǝʌıʇɔⱯssǝןɯɹɐɥ",
"config.gtceu.option.hazardsEnabled": "pǝןqɐuƎspɹɐzɐɥ",
"config.gtceu.option.hideFacadesInJEI": "IƎſuIsǝpɐɔɐℲǝpıɥ",
"config.gtceu.option.hideFilledCellsInJEI": "IƎſuIsןןǝƆpǝןןıℲǝpıɥ",
"config.gtceu.option.hideFacadesInRecipeViewer": "ɹǝʍǝıΛǝdıɔǝᴚuIsǝpɐɔɐℲǝpıɥ",
"config.gtceu.option.hideFilledCellsInRecipeViewer": "ɹǝʍǝıΛǝdıɔǝᴚuIsןןǝƆpǝןןıℲǝpıɥ",
"config.gtceu.option.hideOreProcessingDiagrams": "sɯɐɹbɐıᗡbuıssǝɔoɹԀǝɹOǝpıɥ",
"config.gtceu.option.highTierContent": "ʇuǝʇuoƆɹǝı⟘ɥbıɥ",
"config.gtceu.option.hpLiquidBoilerBaseOutput": "ʇndʇnOǝsɐᗺɹǝןıoᗺpınbıꞀdɥ",
Expand All @@ -2311,7 +2312,7 @@
"config.gtceu.option.nanoSaber": "ɹǝqɐSouɐu",
"config.gtceu.option.nanoSaberBaseDamage": "ǝbɐɯɐᗡǝsɐᗺɹǝqɐSouɐu",
"config.gtceu.option.nanoSaberDamageBoost": "ʇsooᗺǝbɐɯɐᗡɹǝqɐSouɐu",
"config.gtceu.option.nativeEUToPlatformNative": "ǝʌıʇɐNɯɹoɟʇɐןԀo⟘∩Ǝǝʌıʇɐu",
"config.gtceu.option.nativeEUToFE": "ƎℲo⟘∩Ǝǝʌıʇɐu",
"config.gtceu.option.nerfPaperCrafting": "buıʇɟɐɹƆɹǝdɐԀɟɹǝu",
"config.gtceu.option.nerfWoodCrafting": "buıʇɟɐɹƆpooMɟɹǝu",
"config.gtceu.option.onlyOwnerBreak": "ʞɐǝɹᗺɹǝuʍOʎןuo",
Expand All @@ -2329,7 +2330,6 @@
"config.gtceu.option.oreVeins": "suıǝΛǝɹo",
"config.gtceu.option.overclockDivisor": "ɹosıʌıᗡʞɔoןɔɹǝʌo",
"config.gtceu.option.ownerOPBypass": "ssɐdʎᗺԀOɹǝuʍo",
"config.gtceu.option.platformToEuRatio": "oıʇɐᴚnƎo⟘ɯɹoɟʇɐןd",
"config.gtceu.option.prospectorEnergyUseMultiplier": "ɹǝıןdıʇןnWǝs∩ʎbɹǝuƎɹoʇɔǝdsoɹd",
"config.gtceu.option.recipeProgressLowEnergy": "ʎbɹǝuƎʍoꞀssǝɹboɹԀǝdıɔǝɹ",
"config.gtceu.option.recipes": "sǝdıɔǝɹ",
Expand Down
12 changes: 6 additions & 6 deletions src/generated/resources/assets/gtceu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -2253,9 +2253,9 @@
"config.gtceu.option.dumpRecipes": "dumpRecipes",
"config.gtceu.option.enableCleanroom": "enableCleanroom",
"config.gtceu.option.enableCompass": "enableCompass",
"config.gtceu.option.enableFEConverters": "enableFEConverters",
"config.gtceu.option.enableMaintenance": "enableMaintenance",
"config.gtceu.option.enableMoreDualHatchAbility": "enableMoreDualHatchAbility",
"config.gtceu.option.enablePlatformConverters": "enablePlatformConverters",
"config.gtceu.option.enableResearch": "enableResearch",
"config.gtceu.option.enableTieredCasings": "enableTieredCasings",
"config.gtceu.option.enableWorldAccelerators": "enableWorldAccelerators",
Expand All @@ -2265,7 +2265,8 @@
"config.gtceu.option.energyUsageMultiplier": "energyUsageMultiplier",
"config.gtceu.option.environmentalHazardDecayRate": "environmentalHazardDecayRate",
"config.gtceu.option.environmentalHazards": "environmentalHazards",
"config.gtceu.option.euToPlatformRatio": "euToPlatformRatio",
"config.gtceu.option.euToFeRatio": "euToFeRatio",
"config.gtceu.option.feToEuRatio": "feToEuRatio",
"config.gtceu.option.flintAndSteelRequireSteel": "flintAndSteelRequireSteel",
"config.gtceu.option.gameplay": "gameplay",
"config.gtceu.option.generateLowQualityGems": "generateLowQualityGems",
Expand All @@ -2286,8 +2287,8 @@
"config.gtceu.option.harderRods": "harderRods",
"config.gtceu.option.harmlessActiveTransformers": "harmlessActiveTransformers",
"config.gtceu.option.hazardsEnabled": "hazardsEnabled",
"config.gtceu.option.hideFacadesInJEI": "hideFacadesInJEI",
"config.gtceu.option.hideFilledCellsInJEI": "hideFilledCellsInJEI",
"config.gtceu.option.hideFacadesInRecipeViewer": "hideFacadesInRecipeViewer",
"config.gtceu.option.hideFilledCellsInRecipeViewer": "hideFilledCellsInRecipeViewer",
"config.gtceu.option.hideOreProcessingDiagrams": "hideOreProcessingDiagrams",
"config.gtceu.option.highTierContent": "highTierContent",
"config.gtceu.option.hpLiquidBoilerBaseOutput": "hpLiquidBoilerBaseOutput",
Expand All @@ -2311,7 +2312,7 @@
"config.gtceu.option.nanoSaber": "nanoSaber",
"config.gtceu.option.nanoSaberBaseDamage": "nanoSaberBaseDamage",
"config.gtceu.option.nanoSaberDamageBoost": "nanoSaberDamageBoost",
"config.gtceu.option.nativeEUToPlatformNative": "nativeEUToPlatformNative",
"config.gtceu.option.nativeEUToFE": "nativeEUToFE",
"config.gtceu.option.nerfPaperCrafting": "nerfPaperCrafting",
"config.gtceu.option.nerfWoodCrafting": "nerfWoodCrafting",
"config.gtceu.option.onlyOwnerBreak": "onlyOwnerBreak",
Expand All @@ -2329,7 +2330,6 @@
"config.gtceu.option.oreVeins": "oreVeins",
"config.gtceu.option.overclockDivisor": "overclockDivisor",
"config.gtceu.option.ownerOPBypass": "ownerOPBypass",
"config.gtceu.option.platformToEuRatio": "platformToEuRatio",
"config.gtceu.option.prospectorEnergyUseMultiplier": "prospectorEnergyUseMultiplier",
"config.gtceu.option.recipeProgressLowEnergy": "recipeProgressLowEnergy",
"config.gtceu.option.recipes": "recipes",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public EUToFEProvider(BlockEntity tileEntity) {

@Override
public <T> LazyOptional<T> getCapability(@NotNull Capability<T> capability, Direction facing) {
if (!ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative ||
if (!ConfigHolder.INSTANCE.compat.energy.nativeEUToFE ||
capability != GTCapability.CAPABILITY_ENERGY_CONTAINER)
return LazyOptional.empty();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ public class FeCompat {
* Conversion ratio used by energy converters
*/
public static int ratio(boolean feToEu) {
return feToEu ? ConfigHolder.INSTANCE.compat.energy.platformToEuRatio :
ConfigHolder.INSTANCE.compat.energy.euToPlatformRatio;
return feToEu ? ConfigHolder.INSTANCE.compat.energy.feToEuRatio :
ConfigHolder.INSTANCE.compat.energy.euToFeRatio;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void inventoryTick(ItemStack stack, Level level, Entity entity, int slotI
transferLimit -= chargedAmount;
if (transferLimit == 0L) break;
}
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative) {
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToFE) {
var feEnergyItem = GTCapabilityHelper.getForgeEnergyItem(itemInSlot);
if (feEnergyItem != null && feEnergyItem.canReceive() &&
feEnergyItem.getEnergyStored() < feEnergyItem.getMaxEnergyStored()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public ManagedFieldHolder getFieldHolder() {
protected CustomItemStackHandler createChargerItemHandler(Object... args) {
var handler = new CustomItemStackHandler();
handler.setFilter(item -> GTCapabilityHelper.getElectricItem(item) != null ||
(ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative &&
(ConfigHolder.INSTANCE.compat.energy.nativeEUToFE &&
GTCapabilityHelper.getForgeEnergyItem(item) != null));
return handler;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public boolean dischargeOrRechargeEnergyContainers(IItemHandlerModifiable itemHa
}
return true;
}
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative) {
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToFE) {
IEnergyStorage energyStorage = GTCapabilityHelper.getForgeEnergyItem(stackInSlot);
if (energyStorage != null && handleForgeEnergyItem(energyStorage, simulate)) {
if (!simulate) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public CommonProxy() {
GTCEuAPI.initializeHighTier();
if (Platform.isDevEnv()) {
ConfigHolder.INSTANCE.recipes.generateLowQualityGems = true;
ConfigHolder.INSTANCE.compat.energy.enablePlatformConverters = true;
ConfigHolder.INSTANCE.compat.energy.enableFEConverters = true;
}

GTValueProviderTypes.init(eventBus);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2707,7 +2707,7 @@ public static MachineDefinition registerDrum(Material material, int capacity, St
}

public static MachineDefinition[] registerConverter(int amperage) {
if (!ConfigHolder.INSTANCE.compat.energy.enablePlatformConverters) {
if (!ConfigHolder.INSTANCE.compat.energy.enableFEConverters) {
REGISTRATE.creativeModeTab(() -> null);
}

Expand All @@ -2731,7 +2731,7 @@ public static MachineDefinition[] registerConverter(int amperage) {
.register(),
ALL_TIERS);

if (!ConfigHolder.INSTANCE.compat.energy.enablePlatformConverters) {
if (!ConfigHolder.INSTANCE.compat.energy.enableFEConverters) {
REGISTRATE.creativeModeTab(() -> MACHINE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public int getSlotLimit(int slot) {
}
};
handler.setFilter(item -> GTCapabilityHelper.getElectricItem(item) != null ||
(ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative &&
(ConfigHolder.INSTANCE.compat.energy.nativeEUToFE &&
GTCapabilityHelper.getForgeEnergyItem(item) != null));
return handler;
}
Expand Down Expand Up @@ -157,7 +157,7 @@ private List<Object> getNonFullBatteries() {
if (electricItem.getCharge() < electricItem.getMaxCharge()) {
batteries.add(electricItem);
}
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative) {
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToFE) {
IEnergyStorage energyStorage = GTCapabilityHelper.getForgeEnergyItem(batteryStack);
if (energyStorage != null) {
if (energyStorage.getEnergyStored() < energyStorage.getMaxEnergyStored()) {
Expand Down Expand Up @@ -190,7 +190,7 @@ private List<Object> getAllBatteries() {
var electricItem = GTCapabilityHelper.getElectricItem(batteryStack);
if (electricItem != null) {
batteries.add(electricItem);
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative) {
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToFE) {
IEnergyStorage energyStorage = GTCapabilityHelper.getForgeEnergyItem(batteryStack);
if (energyStorage != null) {
batteries.add(energyStorage);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public ManagedFieldHolder getFieldHolder() {
protected CustomItemStackHandler createChargerItemHandler() {
var handler = new CustomItemStackHandler();
handler.setFilter(item -> GTCapabilityHelper.getElectricItem(item) != null ||
(ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative &&
(ConfigHolder.INSTANCE.compat.energy.nativeEUToFE &&
GTCapabilityHelper.getForgeEnergyItem(item) != null));
return handler;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected NotifiableEnergyContainer createEnergyContainer(Object... args) {
protected CustomItemStackHandler createChargerInventory(Object... args) {
var handler = new CustomItemStackHandler(this.inventorySize);
handler.setFilter(item -> GTCapabilityHelper.getElectricItem(item) != null ||
(ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative &&
(ConfigHolder.INSTANCE.compat.energy.nativeEUToFE &&
GTCapabilityHelper.getForgeEnergyItem(item) != null));
return handler;
}
Expand Down Expand Up @@ -166,7 +166,7 @@ private List<Object> getNonFullElectricItem() {
if (electricItem.getCharge() < electricItem.getMaxCharge()) {
electricItems.add(electricItem);
}
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative) {
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToFE) {
var energyStorage = GTCapabilityHelper.getForgeEnergyItem(electricItemStack);
if (energyStorage != null) {
if (energyStorage.getEnergyStored() < energyStorage.getMaxEnergyStored()) {
Expand Down Expand Up @@ -263,7 +263,7 @@ public long getEnergyCapacity() {
var electricItem = GTCapabilityHelper.getElectricItem(electricItemStack);
if (electricItem != null) {
energyCapacity += electricItem.getMaxCharge();
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative) {
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToFE) {
var energyStorage = GTCapabilityHelper.getForgeEnergyItem(electricItemStack);
if (energyStorage != null) {
energyCapacity += FeCompat.toEu(energyStorage.getMaxEnergyStored(),
Expand All @@ -287,7 +287,7 @@ public long getEnergyStored() {
var electricItem = GTCapabilityHelper.getElectricItem(electricItemStack);
if (electricItem != null) {
energyStored += electricItem.getCharge();
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative) {
} else if (ConfigHolder.INSTANCE.compat.energy.nativeEUToFE) {
var energyStorage = GTCapabilityHelper.getForgeEnergyItem(electricItemStack);
if (energyStorage != null) {
energyStored += FeCompat.toEu(energyStorage.getEnergyStored(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public FisherMachine(IMachineBlockEntity holder, int tier, Object... ignoredArgs
protected CustomItemStackHandler createChargerItemHandler() {
var handler = new CustomItemStackHandler();
handler.setFilter(item -> GTCapabilityHelper.getElectricItem(item) != null ||
(ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative &&
(ConfigHolder.INSTANCE.compat.energy.nativeEUToFE &&
GTCapabilityHelper.getForgeEnergyItem(item) != null));
return handler;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public ItemCollectorMachine(IMachineBlockEntity holder, int tier, Object... igno
protected CustomItemStackHandler createChargerItemHandler() {
var handler = new CustomItemStackHandler();
handler.setFilter(item -> GTCapabilityHelper.getElectricItem(item) != null ||
(ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative &&
(ConfigHolder.INSTANCE.compat.energy.nativeEUToFE &&
GTCapabilityHelper.getForgeEnergyItem(item) != null));
return handler;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public ManagedFieldHolder getFieldHolder() {
protected CustomItemStackHandler createChargerItemHandler(Object... args) {
var handler = new CustomItemStackHandler();
handler.setFilter(item -> GTCapabilityHelper.getElectricItem(item) != null ||
(ConfigHolder.INSTANCE.compat.energy.nativeEUToPlatformNative &&
(ConfigHolder.INSTANCE.compat.energy.nativeEUToFE &&
GTCapabilityHelper.getForgeEnergyItem(item) != null));
return handler;
}
Expand Down
27 changes: 13 additions & 14 deletions src/main/java/com/gregtechceu/gtceu/config/ConfigHolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ public static class CompatibilityConfigs {
@Configurable
@Configurable.Comment({ "Whether to hide facades of all blocks in JEI and creative search menu.",
"Default: true" })
public boolean hideFacadesInJEI = true;
public boolean hideFacadesInRecipeViewer = true;

@Configurable
@Configurable.Comment({ "Whether to hide filled cells in JEI and creative search menu.", "Default: true" })
public boolean hideFilledCellsInJEI = true;
public boolean hideFilledCellsInRecipeViewer = true;

@Configurable
@Configurable.Comment({ "Whether to hide the ore processing diagrams in JEI", "Default: false" })
Expand All @@ -168,32 +168,31 @@ public static class CompatibilityConfigs {
public boolean removeSmeltingForEBFMetals = true;

@Configurable
@Configurable.Comment({ "Whether dimension marker should show dimension tier.", "Default: false" })
@Configurable.Comment({ "Whether dimension markers should show the dimension tier value.", "Default: false" })
public boolean showDimensionTier = false;

public static class EnergyCompatConfig {

@Configurable
@Configurable.Comment({
"Enable Native GTEU to Platform native Energy (RF and alike) on GT Cables and Wires.",
@Configurable.Comment({ "Enable Native GTEU to Forge Energy (RF and alike) on GT Cables and Wires.",
"This does not enable nor disable Converters.", "Default: true" })
public boolean nativeEUToPlatformNative = true;
public boolean nativeEUToFE = true;

@Configurable
@Configurable.Comment({ "Enable GTEU to Platform native (and vice versa) Converters.", "Default: false" })
public boolean enablePlatformConverters = false;
@Configurable.Comment({ "Enable GTEU to FE (and vice versa) Converters.", "Default: false" })
public boolean enableFEConverters = false;

@Configurable
@Configurable.Comment({ "Platform native Energy to GTEU ratio for converting FE to EU.",
"Only affects converters.", "Default: 4 FE/Energy == 1 EU" })
@Configurable.Comment({ "Forge Energy to GTEU ratio for converting FE to EU.", "Only affects converters.",
"Default: 4 FE == 1 EU" })
@Configurable.Range(min = 1, max = 16)
public int platformToEuRatio = 4;
public int feToEuRatio = 4;

@Configurable
@Configurable.Comment({ "GTEU to Platform native Energy ratio for converting EU to FE.",
"Affects native conversion and Converters.", "Default: 4 FE/Energy == 1 EU" })
@Configurable.Comment({ "GTEU to Forge Energy ratio for converting EU to FE.",
"Affects native conversion and Converters.", "Default: 4 FE == 1 EU" })
@Configurable.Range(min = 1, max = 16)
public int euToPlatformRatio = 4;
public int euToFeRatio = 4;
}

public static class AE2CompatConfig {
Expand Down
Loading

0 comments on commit 52561ba

Please sign in to comment.