Skip to content

Commit

Permalink
Add back the RF literal to restore addon compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Apr 11, 2024
1 parent 09f3e49 commit 6f940db
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/generated/resources/assets/ae2/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@
"gui.ae2.inWorldSingularity": "To create drop 1 Singularity and 1 Ender Dust and cause an explosion within range of the items.",
"gui.ae2.units.appliedenergistics": "AE",
"gui.ae2.units.fe": "FE",
"gui.ae2.units.rf": "RF",
"gui.tooltips.ae2.ActiveOnPulse": "Activate once per pulse",
"gui.tooltips.ae2.ActiveWithSignal": "Active with signal",
"gui.tooltips.ae2.ActiveWithoutSignal": "Active without signal",
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/appeng/api/config/PowerUnits.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@

public enum PowerUnits {
AE("gui.ae2.units.appliedenergistics", "AE"), // Native Units - AE Energy
FE("gui.ae2.units.fe", "FE"); // Forge Energy
FE("gui.ae2.units.fe", "FE"), // Forge Energy
@Deprecated(forRemoval = true)
RF("gui.ae2.units.rf", "RF"); // Forge Energy

/**
* unlocalized name for the power unit.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/appeng/api/config/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private Settings() {

private synchronized static <T extends Enum<T>> Setting<T> register(String name, Class<T> enumClass) {
Preconditions.checkState(!SETTINGS.containsKey(name));
var setting = new Setting<T>(name, enumClass);
var setting = new Setting<>(name, enumClass);
SETTINGS.put(name, setting);
return setting;
}
Expand All @@ -56,7 +56,7 @@ private synchronized static <T extends Enum<T>> Setting<T> register(String name,
RedstoneMode.LOW_SIGNAL);
public static final Setting<RedstoneMode> REDSTONE_CONTROLLED = register("redstone_controlled", RedstoneMode.class);
public static final Setting<CondenserOutput> CONDENSER_OUTPUT = register("condenser_output", CondenserOutput.class);
public static final Setting<PowerUnits> POWER_UNITS = register("power_units", PowerUnits.class);
public static final Setting<PowerUnits> POWER_UNITS = register("power_units", PowerUnits.AE, PowerUnits.FE);
public static final Setting<AccessRestriction> ACCESS = register("access", AccessRestriction.READ_WRITE,
AccessRestriction.READ, AccessRestriction.WRITE);
public static final Setting<SortDir> SORT_DIRECTION = register("sort_direction", SortDir.class);
Expand Down
1 change: 1 addition & 0 deletions src/main/java/appeng/core/AEConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ private void syncClientConfig() {

private void syncCommonConfig() {
PowerUnits.FE.conversionRatio = COMMON.powerRatioForgeEnergy.get();
PowerUnits.RF.conversionRatio = COMMON.powerRatioForgeEnergy.get();
PowerMultiplier.CONFIG.multiplier = COMMON.powerUsageMultiplier.get();

CondenserOutput.MATTER_BALLS.requiredPower = COMMON.condenserMatterBallsPower.get();
Expand Down

0 comments on commit 6f940db

Please sign in to comment.