Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
Update the version
Remove the original sorting configuration
Remove unused recipe output

--中文--
更新版本
删除原始的排序配置
删除未使用的配方输出
  • Loading branch information
sddsd2332 committed Mar 29, 2023
1 parent d299680 commit 3be244f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ minecraft_version=1.12.2
mappings_version=stable_39
forge_version=14.23.5.2847
mod_version=9.8.11
homebaked=120-sddsd2332
homebaked=150-sddsd2332

mcmp_version=2.5.3
jei_version=4.15.0.289
Expand Down
19 changes: 16 additions & 3 deletions src/main/java/mekanism/common/config/GeneralConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,31 +307,44 @@ public class GeneralConfig extends BaseConfig {

public final BooleanOption blacklistForge = new BooleanOption(this, "general", "BlacklistForgePower", false,
"Disables Forge Energy (FE,IF,uF,CF) power integration. Requires world restart (server-side option in SMP).");

public final IntOption laserRange = new IntOption(this, "general", "LaserRange", 64,
"How far (in blocks) a laser can travel.");

public final IntOption laserEnergyNeededPerHardness = new IntOption(this, "general", "LaserDiggingEnergy", 100000,
"Energy needed to destroy or attract blocks with a Laser (per block hardness level).");

public final BooleanOption destroyDisabledBlocks = new BooleanOption(this, "general", "DestroyDisabledBlocks", true,
"If machine is disabled in config, do we set its block to air if it is found in world?");

public final BooleanOption voidInvalidGases = new BooleanOption(this, "general", "VoidInvalidGases", true,
"Should machines void the gas inside of them on load if there is no recipe using that gas.");

public final IntOption digitalMinerMaxRadius = new IntOption(this, "general", "digitalMinerMaxRadius", 32,
"Maximum radius in blocks that the Digital Miner can reach. (Increasing this may have negative effects on stability and/or performance. "
+ "We strongly recommend you leave it at the default value.)", 1, Integer.MAX_VALUE);

public final DoubleOption sawdustChancePlank = new DoubleOption(this, "general", "SawdustChancePlank", 0.25D,
"Chance of producing sawdust per operation in the precision sawmill when turning planks into sticks.").setRequiresGameRestart(true);

public final DoubleOption sawdustChanceLog = new DoubleOption(this, "general", "SawdustChanceLog", 1D,
"Chance of producing sawdust per operation in the precision sawmill when turning logs into planks.").setRequiresGameRestart(true);

public final DoubleOption seed = new DoubleOption(this, "general", "seed", 1D,
"When turning seeds into crops, the chance to produce seeds for each operation in Organic Farm").setRequiresGameRestart(true);

public final DoubleOption log = new DoubleOption(this, "general", "log", 1D,
"When turning seeds into crops, the opportunity to produce log in each operation in Organic Farm.").setRequiresGameRestart(true);
public final BooleanOption newfactoryautosorting = new BooleanOption(this, "general", "New Factory Auto Sorting(WIP)", false,
"Do you use New Factory Auto Sorting? This can cause problems.");
public final TypeConfigManager<MachineType> machinesManager = new TypeConfigManager<>(this, "machines", MachineType.class, MachineType::getValidMachines, MachineType::getBlockName);

public final TypeConfigManager<MachineType> machinesManager = new TypeConfigManager<>(this, "machines",
MachineType.class, MachineType::getValidMachines, MachineType::getBlockName);

public final EnumMap<BaseTier, TierConfig> tiers = TierConfig.create(this);

public EnumOption<EnergyType> energyUnit = new EnumOption<>(this, "general", "EnergyType", EnergyType.RF,
"Displayed energy type in Mekanism GUIs.");

public EnumOption<TempType> tempUnit = new EnumOption<>(this, "general", "Temperature Units", TempType.K,
"Displayed temperature unit in Mekanism GUIs.");

}
1 change: 1 addition & 0 deletions src/main/java/mekanism/common/config/TierConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class TierConfig {
public final IntOption GasTankStorage;
public final IntOption GasTankOutput;
public final IntOption BinStorage;

private TierConfig(BaseConfig baseConfig, BaseTier tier) {
String name = tier.getSimpleName();
EnergyCubeMaxEnergy = new DoubleOption(baseConfig, "tier", name + "EnergyCubeMaxEnergy", EnergyCubeTier.values()[tier.ordinal()].getBaseMaxEnergy(),
Expand Down
16 changes: 1 addition & 15 deletions src/main/java/mekanism/common/tile/TileEntityFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
import java.util.List;
import java.util.Objects;

@SuppressWarnings("rawtypes")

public class TileEntityFactory extends TileEntityMachine implements IComputerIntegration, ISideConfiguration, IGasHandler, ISpecialConfigData, ITierUpgradeable,
ISustainedData, IComparatorSupport {

Expand Down Expand Up @@ -178,20 +178,6 @@ private static int[] getSlotsWithTier(FactoryTier tier) {
}
}

public static ItemStack getRecipeOutput(MachineRecipe recipe) {
if (recipe.recipeOutput instanceof ItemStackOutput) {
return ((ItemStackOutput) recipe.recipeOutput).output;
} else if (recipe.recipeOutput instanceof ChanceOutput) {
return ((ChanceOutput) recipe.recipeOutput).primaryOutput;
} else if (recipe.recipeOutput instanceof ChanceOutput2) {
return ((ChanceOutput2) recipe.recipeOutput).primaryOutput;
} else if (recipe.recipeOutput instanceof PressurizedOutput) {
return ((PressurizedOutput) recipe.recipeOutput).getItemOutput();
} else {
return ItemStack.EMPTY;
}
}

public static ItemStack getRecipeInput(MachineRecipe recipe) {
if (recipe.recipeInput instanceof ItemStackInput) {
return ((ItemStackInput) recipe.recipeInput).ingredient;
Expand Down

0 comments on commit 3be244f

Please sign in to comment.