Skip to content

Commit

Permalink
remove tf resistance nerfs
Browse files Browse the repository at this point in the history
  • Loading branch information
boubou19 committed Sep 17, 2024
1 parent d3d0dcd commit 57157a9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
8 changes: 0 additions & 8 deletions src/main/java/tectech/loader/ConfigHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
@Config.RequiresMcRestart
public class ConfigHandler {
public static Debug debug = new Debug();
public static Features features = new Features();
public static TeslaTweaks teslaTweaks = new TeslaTweaks();

@Config.Comment("Debug section")
Expand All @@ -18,13 +17,6 @@ public static class Debug{
public boolean DEBUG_MODE;
}

@Config.Comment("Features section")
public static class Features{
@Config.Comment("Set to true to disable the block hardness nerf")
@Config.DefaultBoolean(false)
public boolean DISABLE_BLOCK_HARDNESS_NERF;
}

@Config.Comment("Tesla tweaks section")
public static class TeslaTweaks{
@Config.Ignore()
Expand Down
26 changes: 1 addition & 25 deletions src/main/java/tectech/loader/MainLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static void load() {
}

public static void postLoad() {
ProgressManager.ProgressBar progressBarPostLoad = ProgressManager.push("TecTech Post Loader", 4);
ProgressManager.ProgressBar progressBarPostLoad = ProgressManager.push("TecTech Post Loader", 2);

progressBarPostLoad.step("Dreamcraft Compatibility");
if (NewHorizonsCoreMod.isModLoaded()) {
Expand All @@ -98,30 +98,6 @@ public static void postLoad() {
progressBarPostLoad.step("Recipes");
new BaseRecipeLoader().run();
TecTech.LOGGER.info("Recipe Init Done");

if (!ConfigHandler.features.DISABLE_BLOCK_HARDNESS_NERF) {
progressBarPostLoad.step("Nerf blocks blast resistance");
adjustTwilightBlockResistance();
TecTech.LOGGER.info("Blocks nerf done");
} else {
progressBarPostLoad.step("Do not nerf blocks blast resistance");
TecTech.LOGGER.info("Blocks were not nerfed");
}
}

private static void safeSetResistance(Block block, float resistance) {
if (block != null) {
block.setResistance(resistance);
}
}

private static void adjustTwilightBlockResistance() {
if (TwilightForest.isModLoaded()) {
safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFShield"), 30);
safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFThorns"), 10);
safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFTowerTranslucent"), 30);
safeSetResistance(GameRegistry.findBlock("TwilightForest", "tile.TFDeadrock"), 5);
}
}

public static void onLoadCompleted() {
Expand Down

0 comments on commit 57157a9

Please sign in to comment.