Opt-out config in common config added (issue #154), server opt-outs untouched to prevent breaking configs applied in the fields.
This commit is contained in:
parent
61d0225afa
commit
915ef88029
23 changed files with 180 additions and 117 deletions
|
@ -5,4 +5,4 @@ version_minecraft=1.16.4
|
|||
version_forge_minecraft=1.16.4-35.1.10
|
||||
version_fml_mappings=20201028-1.16.3
|
||||
version_jei=1.16.4:7.6.1.63
|
||||
version_engineersdecor=1.1.6-b3
|
||||
version_engineersdecor=1.1.6
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/engineers-decor/",
|
||||
"1.16.4": {
|
||||
"1.1.6": "[F] Added common-config opt-out specification for pack level opt-outs (issue #154, ty gekkone), will replace server config opt-out in MC1.17.",
|
||||
"1.1.6-b3": "[M] Config logging edited, E-Furnace GUI capacitor tooltip added, E-Furnace power consumption independent of config speed setting (issue #152 ty Staegrin).",
|
||||
"1.1.6-b2": "[M] Alternative Clinker Brick recipe (swapped Bricks/Nether Bricks) added.\n[M] Furnace XP handling simplified (simply stores/releases XP for each smelting process).\n[M] Mod devices do not propagate strong Redstone power to adjacent blocks.\n[M] Minor \"librarizing\" changes under the hood.",
|
||||
"1.1.6-b1": "[F] Fixed Metal Crafting Table Hopper access (issue #147, ty umerrr).\n[F] Fixed Dark Shingle Roof Chimney placement restriction (issue #149, thx WenXin20).\n[F] Door tags added for Wood Door and Metal Sliding Door (issue #150, thx WenXin20).\n[A] Electrical Furnace automatically chokes speed and power consumption when the internally stored power is below 20%.",
|
||||
|
@ -23,7 +24,7 @@
|
|||
"1.1.2-b1": "[U] Ported to MC1.16.2."
|
||||
},
|
||||
"promos": {
|
||||
"1.16.4-recommended": "1.1.5",
|
||||
"1.16.4-latest": "1.1.6-b3"
|
||||
"1.16.4-recommended": "1.1.6",
|
||||
"1.16.4-latest": "1.1.6"
|
||||
}
|
||||
}
|
|
@ -11,6 +11,9 @@ Mod sources for Minecraft version 1.16.x.
|
|||
|
||||
## Version history
|
||||
|
||||
- v1.1.6 [F] Added common-config opt-out specification for pack level opt-outs (issue #154,
|
||||
ty gekkone), will replace server config opt-out in MC1.17.
|
||||
|
||||
- v1.1.6-b3 [M] Config logging edited, E-Furnace GUI capacitor tooltip added, E-Furnace power consumption
|
||||
independent of config speed setting (issue #152 ty Staegrin).
|
||||
|
||||
|
|
|
@ -9,15 +9,16 @@
|
|||
*/
|
||||
package wile.engineersdecor;
|
||||
|
||||
import wile.engineersdecor.blocks.*;
|
||||
import wile.engineersdecor.libmc.blocks.StandardBlocks;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.ForgeConfigSpec;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import wile.engineersdecor.blocks.*;
|
||||
import wile.engineersdecor.libmc.blocks.StandardBlocks;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.OptionalRecipeCondition;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
|
@ -79,8 +80,59 @@ public class ModConfig
|
|||
|
||||
public static class CommonConfig
|
||||
{
|
||||
// Optout
|
||||
public final ForgeConfigSpec.ConfigValue<String> pattern_excludes;
|
||||
public final ForgeConfigSpec.ConfigValue<String> pattern_includes;
|
||||
// MISC
|
||||
public final ForgeConfigSpec.BooleanValue with_creative_mode_device_drops;
|
||||
public final ForgeConfigSpec.BooleanValue with_experimental;
|
||||
public final ForgeConfigSpec.BooleanValue with_config_logging;
|
||||
|
||||
CommonConfig(ForgeConfigSpec.Builder builder)
|
||||
{
|
||||
builder.comment("Settings affecting the logical server side.")
|
||||
.push("server");
|
||||
// --- OPTOUTS ------------------------------------------------------------
|
||||
{
|
||||
builder.comment("Opt-out settings")
|
||||
.push("optout");
|
||||
pattern_excludes = builder
|
||||
.translation(MODID + ".config.pattern_excludes")
|
||||
.comment("Opt-out any block by its registry name ('*' wildcard matching, "
|
||||
+ "comma separated list, whitespaces ignored. You must match the whole name, "
|
||||
+ "means maybe add '*' also at the begin and end. Example: '*wood*,*steel*' "
|
||||
+ "excludes everything that has 'wood' or 'steel' in the registry name. "
|
||||
+ "The matching result is also traced in the log file. ")
|
||||
.define("pattern_excludes", "");
|
||||
pattern_includes = builder
|
||||
.translation(MODID + ".config.pattern_includes")
|
||||
.comment("Prevent blocks from being opt'ed by registry name ('*' wildcard matching, "
|
||||
+ "comma separated list, whitespaces ignored. Evaluated before all other opt-out checks. "
|
||||
+ "You must match the whole name, means maybe add '*' also at the begin and end. Example: "
|
||||
+ "'*wood*,*steel*' includes everything that has 'wood' or 'steel' in the registry name."
|
||||
+ "The matching result is also traced in the log file.")
|
||||
.define("pattern_includes", "");
|
||||
builder.pop();
|
||||
}
|
||||
// --- MISC ---------------------------------------------------------------
|
||||
{
|
||||
builder.comment("Miscellaneous settings")
|
||||
.push("miscellaneous");
|
||||
with_experimental = builder
|
||||
.translation(MODID + ".config.with_experimental")
|
||||
.comment("Enables experimental features. Use at own risk.")
|
||||
.define("with_experimental", false);
|
||||
with_creative_mode_device_drops = builder
|
||||
.translation(MODID + ".config.with_creative_mode_device_drops")
|
||||
.comment("Enable that devices are dropped as item also in creative mode, allowing " +
|
||||
" to relocate them with contents and settings.")
|
||||
.define("with_creative_mode_device_drops", false);
|
||||
with_config_logging = builder
|
||||
.translation(MODID + ".config.with_config_logging")
|
||||
.comment("Enable detailed logging of the config values and resulting calculations in each mod feature config.")
|
||||
.define("with_config_logging", false);
|
||||
builder.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,6 +141,12 @@ public class ModConfig
|
|||
public static class ServerConfig
|
||||
{
|
||||
// Optout
|
||||
public final ForgeConfigSpec.BooleanValue without_chair_sitting;
|
||||
public final ForgeConfigSpec.BooleanValue without_mob_chair_sitting;
|
||||
public final ForgeConfigSpec.BooleanValue without_ladder_speed_boost;
|
||||
public final ForgeConfigSpec.BooleanValue without_crafting_table_history;
|
||||
|
||||
/// ---------- @todo: remove these settings for MC1.17 / 1.16.5
|
||||
public final ForgeConfigSpec.ConfigValue<String> pattern_excludes;
|
||||
public final ForgeConfigSpec.ConfigValue<String> pattern_includes;
|
||||
public final ForgeConfigSpec.BooleanValue without_clinker_bricks;
|
||||
|
@ -125,15 +183,10 @@ public class ModConfig
|
|||
public final ForgeConfigSpec.BooleanValue without_tree_cutter;
|
||||
public final ForgeConfigSpec.BooleanValue without_labeled_crate;
|
||||
public final ForgeConfigSpec.BooleanValue without_fences;
|
||||
public final ForgeConfigSpec.BooleanValue without_chair_sitting;
|
||||
public final ForgeConfigSpec.BooleanValue without_mob_chair_sitting;
|
||||
public final ForgeConfigSpec.BooleanValue without_ladder_speed_boost;
|
||||
public final ForgeConfigSpec.BooleanValue without_crafting_table_history;
|
||||
public final ForgeConfigSpec.BooleanValue without_direct_slab_pickup;
|
||||
public final ForgeConfigSpec.BooleanValue with_creative_mode_device_drops;
|
||||
/// -----------------------
|
||||
|
||||
// Misc
|
||||
public final ForgeConfigSpec.BooleanValue with_experimental;
|
||||
public final ForgeConfigSpec.BooleanValue without_recipes;
|
||||
public final ForgeConfigSpec.BooleanValue without_direct_slab_pickup;
|
||||
// Tweaks
|
||||
public final ForgeConfigSpec.IntValue furnace_smelting_speed_percent;
|
||||
public final ForgeConfigSpec.IntValue furnace_fuel_efficiency_percent;
|
||||
|
@ -163,7 +216,7 @@ public class ModConfig
|
|||
.push("server");
|
||||
// --- OPTOUTS ------------------------------------------------------------
|
||||
{
|
||||
builder.comment("Opt-out settings")
|
||||
builder.comment("Server dev opt-out settings !WARNING THE OPT-OUTs will be moved to common-config.toml in the next MC version!")
|
||||
.push("optout");
|
||||
pattern_excludes = builder
|
||||
.translation(MODID + ".config.pattern_excludes")
|
||||
|
@ -329,10 +382,6 @@ public class ModConfig
|
|||
.translation(MODID + ".config.without_hsupports")
|
||||
.comment("Disable horizontal supports like the double-T support.")
|
||||
.define("without_hsupports", false);
|
||||
without_recipes = builder
|
||||
.translation(MODID + ".config.without_recipes")
|
||||
.comment("Disable all internal recipes, allowing to use alternative pack recipes.")
|
||||
.define("without_recipes", false);
|
||||
without_fences = builder
|
||||
.translation(MODID + ".config.without_fences")
|
||||
.comment("Disable all fences and fence gates.")
|
||||
|
@ -343,20 +392,11 @@ public class ModConfig
|
|||
{
|
||||
builder.comment("Miscellaneous settings")
|
||||
.push("miscellaneous");
|
||||
with_experimental = builder
|
||||
.translation(MODID + ".config.with_experimental")
|
||||
.comment("Enables experimental features. Use at own risk.")
|
||||
.define("with_experimental", false);
|
||||
without_direct_slab_pickup = builder
|
||||
.translation(MODID + ".config.without_direct_slab_pickup")
|
||||
.comment("Disable directly picking up layers from slabs and slab " +
|
||||
" slices by left clicking while looking up/down.")
|
||||
.define("without_direct_slab_pickup", false);
|
||||
with_creative_mode_device_drops = builder
|
||||
.translation(MODID + ".config.with_creative_mode_device_drops")
|
||||
.comment("Enable that devices are dropped as item also in creative mode, allowing " +
|
||||
" to relocate them with contents and settings.")
|
||||
.define("with_creative_mode_device_drops", false);
|
||||
builder.pop();
|
||||
}
|
||||
// --- TWEAKS -------------------------------------------------------------
|
||||
|
@ -490,7 +530,6 @@ public class ModConfig
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// Optout checks
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -505,7 +544,7 @@ public class ModConfig
|
|||
{ return with_experimental_features_; }
|
||||
|
||||
public static boolean withoutRecipes()
|
||||
{ return without_recipes_; }
|
||||
{ return false; }
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
// Cache
|
||||
|
@ -514,8 +553,7 @@ public class ModConfig
|
|||
private static final CompoundNBT server_config_ = new CompoundNBT();
|
||||
private static HashSet<String> optouts_ = new HashSet<>();
|
||||
private static boolean with_experimental_features_ = false;
|
||||
private static boolean without_recipes_ = false;
|
||||
public static boolean without_crafting_table = false;
|
||||
private static boolean with_config_logging_ = false;
|
||||
public static boolean immersiveengineering_installed = false;
|
||||
public static boolean without_direct_slab_pickup = false;
|
||||
public static boolean with_creative_mode_device_drops = false;
|
||||
|
@ -525,43 +563,54 @@ public class ModConfig
|
|||
|
||||
private static final void updateOptouts()
|
||||
{
|
||||
final ArrayList<String> includes_ = new ArrayList<String>();
|
||||
final ArrayList<String> excludes_ = new ArrayList<String>();
|
||||
final ArrayList<String> includes = new ArrayList<>();
|
||||
final ArrayList<String> excludes = new ArrayList<>();
|
||||
{
|
||||
String inc = SERVER.pattern_includes.get().toLowerCase().replaceAll(MODID+":", "").replaceAll("[^*_,a-z0-9]", "");
|
||||
if(SERVER.pattern_includes.get() != inc) SERVER.pattern_includes.set(inc);
|
||||
if(!inc.isEmpty()) LOGGER.info("Config pattern includes: '" + inc + "'");
|
||||
String inc = COMMON.pattern_includes.get().toLowerCase().replaceAll(MODID+":", "").replaceAll("[^*_,a-z0-9]", "");
|
||||
if(COMMON.pattern_includes.get() != inc) COMMON.pattern_includes.set(inc);
|
||||
String[] incl = inc.split(",");
|
||||
includes_.clear();
|
||||
for(int i=0; i< incl.length; ++i) {
|
||||
incl[i] = incl[i].replaceAll("[*]", ".*?");
|
||||
if(!incl[i].isEmpty()) includes_.add(incl[i]);
|
||||
if(!incl[i].isEmpty()) includes.add(incl[i]);
|
||||
}
|
||||
}
|
||||
{
|
||||
String exc = SERVER.pattern_excludes.get().toLowerCase().replaceAll(MODID+":", "").replaceAll("[^*_,a-z0-9]", "");
|
||||
if(!exc.isEmpty()) LOGGER.info("Config pattern excludes: '" + exc + "'");
|
||||
String exc = COMMON.pattern_excludes.get().toLowerCase().replaceAll(MODID+":", "").replaceAll("[^*_,a-z0-9]", "");
|
||||
String[] excl = exc.split(",");
|
||||
excludes_.clear();
|
||||
for(int i=0; i< excl.length; ++i) {
|
||||
excl[i] = excl[i].replaceAll("[*]", ".*?");
|
||||
if(!excl[i].isEmpty()) excludes_.add(excl[i]);
|
||||
if(!excl[i].isEmpty()) excludes.add(excl[i]);
|
||||
}
|
||||
}
|
||||
if(SERVER_CONFIG_SPEC.isLoaded()) {
|
||||
/// @todo: remove for MC1.17/1.16.5
|
||||
String inc = SERVER.pattern_includes.get().toLowerCase().replaceAll(MODID+":", "").replaceAll("[^*_,a-z0-9]", "");
|
||||
if(SERVER.pattern_includes.get() != inc) SERVER.pattern_includes.set(inc);
|
||||
String[] incl = inc.split(",");
|
||||
for(int i=0; i< incl.length; ++i) {
|
||||
incl[i] = incl[i].replaceAll("[*]", ".*?");
|
||||
if(!incl[i].isEmpty()) includes.add(incl[i]);
|
||||
}
|
||||
}
|
||||
if(SERVER_CONFIG_SPEC.isLoaded()) {
|
||||
/// @todo: remove for MC1.17/1.16.5
|
||||
String exc = SERVER.pattern_excludes.get().toLowerCase().replaceAll(MODID+":", "").replaceAll("[^*_,a-z0-9]", "");
|
||||
String[] excl = exc.split(",");
|
||||
for(int i=0; i< excl.length; ++i) {
|
||||
excl[i] = excl[i].replaceAll("[*]", ".*?");
|
||||
if(!excl[i].isEmpty()) excludes.add(excl[i]);
|
||||
}
|
||||
}
|
||||
if(!excludes.isEmpty()) LOGGER.info("Config pattern excludes: '" + String.join(",", excludes) + "'");
|
||||
if(!includes.isEmpty()) LOGGER.info("Config pattern includes: '" + String.join(",", includes) + "'");
|
||||
{
|
||||
boolean with_log_details = false;
|
||||
HashSet<String> optouts = new HashSet<>();
|
||||
ModContent.getRegisteredItems().stream().filter((Item item) -> {
|
||||
if(item == null) return true;
|
||||
if(SERVER == null) return false;
|
||||
return false;
|
||||
}).forEach(
|
||||
ModContent.getRegisteredItems().stream().filter((item)->(item!=null)).forEach(
|
||||
e -> optouts.add(e.getRegistryName().getPath())
|
||||
);
|
||||
ModContent.getRegisteredBlocks().stream().filter((Block block) -> {
|
||||
if(block==null) return true;
|
||||
if(block==ModContent.SIGN_MODLOGO) return true;
|
||||
if(SERVER==null) return false;
|
||||
try {
|
||||
if(!with_experimental_features_) {
|
||||
if(block instanceof Auxiliaries.IExperimentalFeature) return true;
|
||||
|
@ -576,24 +625,25 @@ public class ModConfig
|
|||
// Force-include/exclude pattern matching
|
||||
final String rn = block.getRegistryName().getPath();
|
||||
try {
|
||||
for(String e : includes_) {
|
||||
for(String e : includes) {
|
||||
if(rn.matches(e)) {
|
||||
if(with_log_details) LOGGER.info("Optout force include: "+rn);
|
||||
log("Optout force include: "+rn);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for(String e : excludes_) {
|
||||
for(String e : excludes) {
|
||||
if(rn.matches(e)) {
|
||||
if(with_log_details) LOGGER.info("Optout force exclude: "+rn);
|
||||
log("Optout force exclude: "+rn);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch(Throwable ex) {
|
||||
LOGGER.error("optout include pattern failed, disabling.");
|
||||
includes_.clear();
|
||||
excludes_.clear();
|
||||
includes.clear();
|
||||
excludes.clear();
|
||||
}
|
||||
// Early non-opt out type based evaluation
|
||||
if(SERVER==null) return false;
|
||||
if(block instanceof EdCraftingTable.CraftingTableBlock) return SERVER.without_crafting_table.get();
|
||||
if(block instanceof EdElectricalFurnace.ElectricalFurnaceBlock) return SERVER.without_electrical_furnace.get();
|
||||
if((block instanceof EdFurnace.FurnaceBlock)&&(!(block instanceof EdElectricalFurnace.ElectricalFurnaceBlock))) return SERVER.without_lab_furnace.get();
|
||||
|
@ -651,16 +701,17 @@ public class ModConfig
|
|||
);
|
||||
optouts_ = optouts;
|
||||
}
|
||||
OptionalRecipeCondition.on_config(withExperimental(), withoutRecipes(), (block)->isOptedOut(block), (item)->isOptedOut(item));
|
||||
}
|
||||
|
||||
public static final void apply()
|
||||
{
|
||||
with_experimental_features_ = SERVER.with_experimental.get();
|
||||
with_config_logging_ = COMMON.with_config_logging.get();
|
||||
with_experimental_features_ = COMMON.with_experimental.get();
|
||||
if(with_experimental_features_) LOGGER.info("Config: EXPERIMENTAL FEATURES ENABLED.");
|
||||
immersiveengineering_installed = Auxiliaries.isModLoaded("immersiveengineering");
|
||||
updateOptouts();
|
||||
without_crafting_table = isOptedOut(ModContent.CRAFTING_TABLE);
|
||||
without_recipes_ = SERVER.without_recipes.get();
|
||||
if(!SERVER_CONFIG_SPEC.isLoaded()) return;
|
||||
without_direct_slab_pickup = SERVER.without_direct_slab_pickup.get();
|
||||
// -----------------------------------------------------------------------------------------------------------------
|
||||
EdChair.on_config(SERVER.without_chair_sitting.get(), SERVER.without_mob_chair_sitting.get(), SERVER.chair_mob_sitting_probability_percent.get(), SERVER.chair_mob_standup_probability_percent.get());
|
||||
|
@ -692,8 +743,15 @@ public class ModConfig
|
|||
{
|
||||
String s = String.join(",", optouts_);
|
||||
server_config_.putString("optout", s);
|
||||
if(!s.isEmpty()) LOGGER.info("Opt-outs:" + s);
|
||||
if(!s.isEmpty()) log("Opt-outs:" + s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static final void log(String config_message)
|
||||
{
|
||||
if(!with_config_logging_) return;
|
||||
LOGGER.info(config_message);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,8 +19,6 @@ import net.minecraftforge.eventbus.api.SubscribeEvent;
|
|||
import net.minecraftforge.fml.ModLoadingContext;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.*;
|
||||
import net.minecraftforge.fml.event.server.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.InterModComms;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
@ -42,12 +40,11 @@ public class ModEngineersDecor
|
|||
Auxiliaries.logGitVersion(MODNAME);
|
||||
OptionalRecipeCondition.init(MODID, LOGGER);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onSetup);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onSendImc);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onRecvImc);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::onClientSetup);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(ForgeEvents::onConfigLoad);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(ForgeEvents::onConfigReload);
|
||||
ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.SERVER, ModConfig.SERVER_CONFIG_SPEC);
|
||||
ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.COMMON, ModConfig.COMMON_CONFIG_SPEC);
|
||||
ModLoadingContext.get().registerConfig(net.minecraftforge.fml.config.ModConfig.Type.CLIENT, ModConfig.CLIENT_CONFIG_SPEC);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
@ -73,16 +70,6 @@ public class ModEngineersDecor
|
|||
wile.engineersdecor.libmc.detail.Overlay.register();
|
||||
}
|
||||
|
||||
private void onSendImc(final InterModEnqueueEvent event)
|
||||
{
|
||||
InterModComms.sendTo("inventorysorter", "containerblacklist", ()->ModContent.CT_TREATED_WOOD_CRAFTING_TABLE.getRegistryName());
|
||||
InterModComms.sendTo("inventorysorter", "slotblacklist", ()-> EdCraftingTable.CraftingOutputSlot.class.getName());
|
||||
InterModComms.sendTo("inventorysorter", "slotblacklist", ()-> EdCraftingTable.CraftingGridSlot.class.getName());
|
||||
}
|
||||
|
||||
private void onRecvImc(final InterModProcessEvent event)
|
||||
{}
|
||||
|
||||
@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
|
||||
public static class ForgeEvents
|
||||
{
|
||||
|
@ -106,10 +93,6 @@ public class ModEngineersDecor
|
|||
public static void onRegisterContainerTypes(final RegistryEvent.Register<ContainerType<?>> event)
|
||||
{ ModContent.registerContainers(event); }
|
||||
|
||||
// @SubscribeEvent
|
||||
public static void onServerStarting(FMLServerStartingEvent event)
|
||||
{}
|
||||
|
||||
public static void onConfigLoad(net.minecraftforge.fml.config.ModConfig.Loading configEvent)
|
||||
{ ModConfig.apply(); }
|
||||
|
||||
|
@ -145,9 +128,8 @@ public class ModEngineersDecor
|
|||
@SubscribeEvent
|
||||
public void onPlayerEvent(final LivingEvent.LivingUpdateEvent event)
|
||||
{
|
||||
if(!(event.getEntity() instanceof PlayerEntity)) return;
|
||||
if((event.getEntity().world == null) || (!(event.getEntity() instanceof PlayerEntity))) return;
|
||||
final PlayerEntity player = (PlayerEntity)event.getEntity();
|
||||
if(player.world == null) return;
|
||||
if(player.isOnLadder()) EdLadderBlock.onPlayerUpdateEvent(player);
|
||||
}
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
*/
|
||||
package wile.engineersdecor.blocks;
|
||||
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Inventories;
|
||||
import wile.engineersdecor.libmc.detail.Overlay;
|
||||
|
@ -168,7 +168,7 @@ public class EdBreaker
|
|||
breaking_reluctance = MathHelper.clamp(breaking_time_per_hardness, 5, 50);
|
||||
min_breaking_time = MathHelper.clamp(min_breaking_time_ticks, 10, 100);
|
||||
requires_power = power_required;
|
||||
ModEngineersDecor.logger().info("Config block breaker: Boost energy consumption:" + (boost_energy_consumption/TICK_INTERVAL) + "rf/t, reluctance=" + breaking_reluctance + "t/hrdn, break time offset=" + min_breaking_time + "t.");
|
||||
ModConfig.log("Config block breaker: Boost energy consumption:" + (boost_energy_consumption/TICK_INTERVAL) + "rf/t, reluctance=" + breaking_reluctance + "t/hrdn, break time offset=" + min_breaking_time + "t.");
|
||||
}
|
||||
|
||||
public BreakerTileEntity()
|
||||
|
|
|
@ -10,8 +10,8 @@ package wile.engineersdecor.blocks;
|
|||
|
||||
import net.minecraft.entity.monster.piglin.PiglinEntity;
|
||||
import net.minecraft.util.math.vector.Vector3d;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import net.minecraft.world.server.ServerWorld;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -40,7 +40,7 @@ public class EdChair
|
|||
sitting_enabled = (!without_sitting);
|
||||
sitting_probability = (without_sitting||without_mob_sitting) ? 0.0 : MathHelper.clamp(sitting_probability_percent/100, 0, 0.9);
|
||||
standup_probability = (without_sitting||without_mob_sitting) ? 1.0 : MathHelper.clamp(standup_probability_percent/100, 1e-6, 1e-2);
|
||||
ModEngineersDecor.logger().info("Config chairs: sit:" + sitting_enabled + ", mob-sit: " + (sitting_probability*100) + "%, standup: " + (standup_probability) + "%.");
|
||||
ModConfig.log("Config chairs: sit:" + sitting_enabled + ", mob-sit: " + (sitting_probability*100) + "%, standup: " + (standup_probability) + "%.");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -45,6 +45,7 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
|||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.client.ContainerGui;
|
||||
|
@ -77,6 +78,8 @@ public class EdCraftingTable
|
|||
with_crafting_slot_mouse_scrolling = !without_crafting_slot_mouse_scrolling;
|
||||
with_outslot_defined_refab = with_assist;
|
||||
CraftingHistory.max_history_size(32);
|
||||
ModConfig.log("Config crafting table: assist:" + with_assist + ", direct-refab:" + with_assist_direct_history_refab +
|
||||
", scrolling:"+with_crafting_slot_mouse_scrolling);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -51,6 +51,7 @@ import net.minecraftforge.items.IItemHandler;
|
|||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import net.minecraftforge.items.wrapper.InvWrapper;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.client.ContainerGui;
|
||||
|
@ -76,7 +77,7 @@ public class EdDropper
|
|||
public static void on_config(boolean with_item_insertion)
|
||||
{
|
||||
with_adjacent_item_insertion = with_item_insertion;
|
||||
ModEngineersDecor.logger().info("Config dropper: item-insertion:" + with_adjacent_item_insertion + ".");
|
||||
ModConfig.log("Config dropper: item-insertion:" + with_adjacent_item_insertion + ".");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -47,6 +47,7 @@ import net.minecraftforge.energy.CapabilityEnergy;
|
|||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceTileEntity;
|
||||
|
@ -157,7 +158,7 @@ public class EdElectricalFurnace
|
|||
energy_consumption_ = MathHelper.clamp(standard_energy_per_tick, 4, 4096) * TICK_INTERVAL;
|
||||
transfer_energy_consumption_ = MathHelper.clamp(energy_consumption_ / 8, 8, HEAT_INCREMENT);
|
||||
with_automatic_inventory_pulling_ = with_automatic_inventory_pulling;
|
||||
ModEngineersDecor.logger().info("Config electrical furnace speed:" + proc_speed_percent_ + "%, heat-loss: 1K/t, heating consumption:" + (energy_consumption_/TICK_INTERVAL)+"rf/t.");
|
||||
ModConfig.log("Config electrical furnace speed:" + proc_speed_percent_ + "%, heat-loss: 1K/t, heating consumption:" + (energy_consumption_/TICK_INTERVAL)+"rf/t.");
|
||||
}
|
||||
|
||||
// ElectricalFurnaceTileEntity -----------------------------------------------------------------------------
|
||||
|
|
|
@ -45,8 +45,8 @@ import net.minecraftforge.fluids.FluidUtil;
|
|||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.blocks.StandardBlocks;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Fluidics;
|
||||
|
@ -72,7 +72,7 @@ public class EdFluidBarrel
|
|||
capacity_ = MathHelper.clamp(tank_capacity, 2000, 64000);
|
||||
tile_fluid_handler_transfer_rate_ = MathHelper.clamp(tank_capacity, 50, 4096);
|
||||
item_fluid_handler_transfer_rate_ = tile_fluid_handler_transfer_rate_;
|
||||
ModEngineersDecor.logger().info("Config fluid barrel: capacity:" + capacity_ + "mb, transfer-rate:" + tile_fluid_handler_transfer_rate_ + "mb/t.");
|
||||
ModConfig.log("Config fluid barrel: capacity:" + capacity_ + "mb, transfer-rate:" + tile_fluid_handler_transfer_rate_ + "mb/t.");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
package wile.engineersdecor.blocks;
|
||||
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
|
@ -54,7 +55,7 @@ public class EdFluidFunnel
|
|||
public static void on_config(boolean with_tank_fluid_collection)
|
||||
{
|
||||
with_device_fluid_handler_collection = with_tank_fluid_collection;
|
||||
ModEngineersDecor.logger().info("Config fluid funnel: tank-fluid-collection:" + with_device_fluid_handler_collection + ".");
|
||||
ModConfig.log("Config fluid funnel: tank-fluid-collection:" + with_device_fluid_handler_collection + ".");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -37,6 +37,7 @@ import net.minecraftforge.items.CapabilityItemHandler;
|
|||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.libmc.detail.Fluidics;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
|
@ -185,7 +186,7 @@ public class EdFreezer
|
|||
energy_consumption = MathHelper.clamp(consumption, 8, 4096);
|
||||
cooldown_rate = MathHelper.clamp(cooldown_per_second, 1, 5);
|
||||
reheat_rate = MathHelper.clamp(cooldown_per_second/2, 1, 5);
|
||||
ModEngineersDecor.logger().info("Config freezer energy consumption:" + energy_consumption + "rf/t, cooldown-rate: " + cooldown_rate + "%/s.");
|
||||
ModConfig.log("Config freezer energy consumption:" + energy_consumption + "rf/t, cooldown-rate: " + cooldown_rate + "%/s.");
|
||||
}
|
||||
|
||||
public FreezerTileEntity()
|
||||
|
|
|
@ -54,6 +54,7 @@ import net.minecraftforge.common.util.FakePlayer;
|
|||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.detail.ExternalObjects;
|
||||
|
@ -235,7 +236,7 @@ public class EdFurnace
|
|||
proc_speed_ = ((double)MathHelper.clamp(speed_percent, 10, 500)) / 100;
|
||||
proc_fuel_efficiency_ = ((double) MathHelper.clamp(fuel_efficiency_percent, 10, 500)) / 100;
|
||||
boost_energy_consumption = TICK_INTERVAL * MathHelper.clamp(boost_energy_per_tick, 4, 4096);
|
||||
ModEngineersDecor.logger().info("Config lab furnace speed:" + (proc_speed_*100) + "%, efficiency:" + (proc_fuel_efficiency_*100) + "%, boost: " + (boost_energy_consumption/TICK_INTERVAL) + "rf/t.");
|
||||
ModConfig.log("Config lab furnace speed:" + (proc_speed_*100) + "%, efficiency:" + (proc_fuel_efficiency_*100) + "%, boost: " + (boost_energy_consumption/TICK_INTERVAL) + "rf/t.");
|
||||
}
|
||||
|
||||
// DecorFurnaceTileEntity -----------------------------------------------------------------------------
|
||||
|
|
|
@ -48,6 +48,7 @@ import net.minecraftforge.common.util.LazyOptional;
|
|||
import net.minecraftforge.fml.network.NetworkHooks;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.blocks.StandardBlocks;
|
||||
|
@ -77,6 +78,7 @@ public class EdLabeledCrate
|
|||
unstorable_containers.clear();
|
||||
unstorable_containers.add(ModContent.LABELED_CRATE.asItem());
|
||||
unstorable_containers.add(Items.SHULKER_BOX);
|
||||
ModConfig.log("Config crate: unstorable:" + unstorable_containers.stream().map(e->e.getRegistryName().toString()).collect(Collectors.joining(",")));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
package wile.engineersdecor.blocks;
|
||||
|
||||
import net.minecraft.entity.EntitySpawnPlacementRegistry;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.util.math.vector.*;
|
||||
|
@ -45,7 +46,10 @@ public class EdLadderBlock extends LadderBlock implements IDecorBlock
|
|||
private static boolean without_speed_boost_ = false;
|
||||
|
||||
public static void on_config(boolean without_speed_boost)
|
||||
{ without_speed_boost_ = without_speed_boost; }
|
||||
{
|
||||
without_speed_boost_ = without_speed_boost;
|
||||
ModConfig.log("Config ladder: without-speed-boost:" + without_speed_boost_);
|
||||
}
|
||||
|
||||
public EdLadderBlock(long config, Block.Properties builder)
|
||||
{ super(builder); }
|
||||
|
|
|
@ -8,11 +8,6 @@
|
|||
*/
|
||||
package wile.engineersdecor.blocks;
|
||||
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import wile.engineersdecor.libmc.detail.*;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.detail.ExternalObjects;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
|
@ -51,6 +46,10 @@ import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
|||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.libmc.detail.*;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.detail.ExternalObjects;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -204,7 +203,7 @@ public class EdMilker
|
|||
milk_containers_.put(new ItemStack(Items.BUCKET), new ItemStack(Items.MILK_BUCKET));
|
||||
if(ExternalObjects.BOTTLED_MILK_BOTTLE_DRINKLABLE!=null) milk_containers_.put(new ItemStack(Items.GLASS_BOTTLE), new ItemStack(ExternalObjects.BOTTLED_MILK_BOTTLE_DRINKLABLE));
|
||||
}
|
||||
ModEngineersDecor.logger().info(
|
||||
ModConfig.log(
|
||||
"Config milker: energy consumption:" + energy_consumption_ + "rf/t"
|
||||
+ ((milk_fluid_==NO_MILK_FLUID)?"[no milk fluid registered]":" [milk fluid available]")
|
||||
+ ((ExternalObjects.BOTTLED_MILK_BOTTLE_DRINKLABLE==null)?"":" [bottledmilk mod available]")
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
package wile.engineersdecor.blocks;
|
||||
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.block.*;
|
||||
|
@ -49,6 +47,10 @@ import net.minecraftforge.items.CapabilityItemHandler;
|
|||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.*;
|
||||
|
@ -250,7 +252,7 @@ public class EdMineralSmelter
|
|||
energy_consumption = MathHelper.clamp(consumption, 8, 4096);
|
||||
heatup_rate = MathHelper.clamp(heatup_per_second, 1, 5);
|
||||
cooldown_rate = MathHelper.clamp(heatup_per_second/2, 1, 5);
|
||||
ModEngineersDecor.logger().info("Config mineal smelter: energy consumption:" + energy_consumption + "rf/t, heat-up rate: " + heatup_rate + "%/s.");
|
||||
ModConfig.log("Config mineal smelter: energy consumption:" + energy_consumption + "rf/t, heat-up rate: " + heatup_rate + "%/s.");
|
||||
}
|
||||
|
||||
public MineralSmelterTileEntity()
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
package wile.engineersdecor.blocks;
|
||||
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import net.minecraft.world.IWorld;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
|
@ -37,6 +35,9 @@ import net.minecraftforge.common.util.LazyOptional;
|
|||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.fluids.capability.IFluidHandler;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
@ -50,7 +51,7 @@ public class EdPipeValve
|
|||
{
|
||||
PipeValveTileEntity.fluid_maxflow_mb = MathHelper.clamp(container_size_decl, 1, 10000);
|
||||
PipeValveTileEntity.redstone_flow_slope_mb = MathHelper.clamp(redstone_slope, 1, 10000);
|
||||
ModEngineersDecor.logger().info("Config pipe valve: maxflow:" + PipeValveTileEntity.fluid_maxflow_mb + "mb, redstone amp:" + PipeValveTileEntity.redstone_flow_slope_mb + "mb/sig.");
|
||||
ModConfig.log("Config pipe valve: maxflow:" + PipeValveTileEntity.fluid_maxflow_mb + "mb, redstone amp:" + PipeValveTileEntity.redstone_flow_slope_mb + "mb/sig.");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
package wile.engineersdecor.blocks;
|
||||
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Overlay;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.LightType;
|
||||
|
@ -36,6 +32,11 @@ import net.minecraftforge.energy.CapabilityEnergy;
|
|||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Overlay;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -114,7 +115,7 @@ public class EdSolarPanel
|
|||
peak_power_per_tick_ = MathHelper.clamp(peak_power_per_tick, 2, 8192);
|
||||
feeding_threshold = Math.max(max_power_storage_/5, 1000);
|
||||
balancing_threshold = Math.max(max_power_storage_/10, 1000);
|
||||
ModEngineersDecor.logger().info("Config small solar panel: Peak production:" + peak_power_per_tick_ + "/t.");
|
||||
ModConfig.log("Config small solar panel: Peak production:" + peak_power_per_tick_ + "/t.");
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -9,11 +9,6 @@
|
|||
package wile.engineersdecor.blocks;
|
||||
|
||||
import net.minecraft.world.IWorldReader;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.detail.TreeCutting;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Overlay;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.block.Block;
|
||||
|
@ -37,6 +32,12 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
|||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.energy.CapabilityEnergy;
|
||||
import net.minecraftforge.energy.IEnergyStorage;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.detail.TreeCutting;
|
||||
import wile.engineersdecor.libmc.detail.Auxiliaries;
|
||||
import wile.engineersdecor.libmc.detail.Overlay;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Random;
|
||||
|
||||
|
@ -132,7 +133,7 @@ public class EdTreeCutter
|
|||
energy_max = Math.max(boost_energy_consumption * 10, 10000);
|
||||
cutting_time_needed = 20 * MathHelper.clamp(cutting_time_seconds, 10, 240);
|
||||
requires_power = power_required;
|
||||
ModEngineersDecor.logger().info("Config tree cutter: energy consumption:" + (boost_energy_consumption/TICK_INTERVAL) + "rf/t" + (requires_power?" (power required for operation) ":"") + ", cutting time:" + cutting_time_needed + "t." );
|
||||
ModConfig.log("Config tree cutter: energy consumption:" + (boost_energy_consumption/TICK_INTERVAL) + "rf/t" + (requires_power?" (power required for operation) ":"") + ", cutting time:" + cutting_time_needed + "t." );
|
||||
}
|
||||
|
||||
public TreeCutterTileEntity()
|
||||
|
|
|
@ -49,6 +49,7 @@ import net.minecraftforge.items.CapabilityItemHandler;
|
|||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
import wile.engineersdecor.ModConfig;
|
||||
import wile.engineersdecor.ModContent;
|
||||
import wile.engineersdecor.ModEngineersDecor;
|
||||
import wile.engineersdecor.blocks.EdFurnace.FurnaceBlock;
|
||||
|
@ -197,7 +198,7 @@ public class EdWasteIncinerator
|
|||
public static void on_config(int boost_energy_per_tick)
|
||||
{
|
||||
energy_consumption = MathHelper.clamp(boost_energy_per_tick, 4, 4096);
|
||||
ModEngineersDecor.logger().info("Config waste incinerator: boost energy consumption:" + energy_consumption + ".");
|
||||
ModConfig.log("Config waste incinerator: boost energy consumption:" + energy_consumption + ".");
|
||||
}
|
||||
|
||||
// WasteIncineratorTileEntity -----------------------------------------------------------------------------
|
||||
|
|
|
@ -39,7 +39,7 @@ public class JEIPlugin implements mezz.jei.api.IModPlugin
|
|||
@Override
|
||||
public void registerRecipeTransferHandlers(IRecipeTransferRegistration registration)
|
||||
{
|
||||
if(!ModConfig.without_crafting_table) {
|
||||
if(!ModConfig.isOptedOut(ModContent.CRAFTING_TABLE)) {
|
||||
try {
|
||||
registration.addRecipeTransferHandler(
|
||||
EdCraftingTable.CraftingTableContainer.class,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue