diff --git a/common/src/main/java/net/anawesomguy/breakingbedrock/BreakingBedrock.java b/common/src/main/java/net/anawesomguy/breakingbedrock/BreakingBedrock.java index 5ec85cf..e0b5316 100644 --- a/common/src/main/java/net/anawesomguy/breakingbedrock/BreakingBedrock.java +++ b/common/src/main/java/net/anawesomguy/breakingbedrock/BreakingBedrock.java @@ -17,20 +17,17 @@ public final class BreakingBedrock { public static final float DESTROY_TIME; public static final float EXPLOSION_RESIST; - public static final int MINING_TIER; static { LOGGER.info("Initializing Breaking Bedrock. This mod overwrites bedrock, and may break with other mods that do the same!"); Properties properties = new Properties(); float destroyTime, explosionResist; - int miningLevel; File configFile = configDir().resolve(BreakingBedrock.MOD_ID + ".properties").toFile(); try { Properties temp = new Properties(); temp.load(new FileInputStream(configFile)); String time = temp.getProperty("destroy_time"), - resist = temp.getProperty("explosion_resist"), - level = temp.getProperty("mining_level"); + resist = temp.getProperty("explosion_resist"); if (time == null || !((destroyTime = Float.parseFloat(time)) > -1) || destroyTime == Float.POSITIVE_INFINITY) { properties.setProperty("destroy_time", "100"); destroyTime = 100F; @@ -41,37 +38,28 @@ public final class BreakingBedrock { explosionResist = 3600000F; LOGGER.debug("Correcting invalid config value {}!", resist); } else properties.setProperty("explosion_resist", resist); - if (level == null || !((miningLevel = Integer.parseInt(level)) > 0)) { - properties.setProperty("mining_level", "4"); - miningLevel = 4; - LOGGER.debug("Correcting invalid config value {}!", level); - } else properties.setProperty("mining_level", level); } catch (IOException | IllegalArgumentException e) { LOGGER.info("Couldn't read config file (likely corrupted or missing)! Attempting to (re)create it."); properties.setProperty("destroy_time", "100"); properties.setProperty("explosion_resist", "3600000"); - properties.setProperty("mining_level", "4"); destroyTime = 100F; explosionResist = 3600000F; - miningLevel = 4; } EXPLOSION_RESIST = explosionResist; DESTROY_TIME = destroyTime; - MINING_TIER = miningLevel; try { properties.store(new FileOutputStream(configFile), """ destroy_time: The destroy time for bedrock. (obsidian is 50, stone is 1.5, -1 is indestructible) explosion_resist: The explosion resistance for bedrock. (stone is 6, glass is 0.3) - mining_level: The mining level required to mine bedrock. (netherite is 4) """); } catch (IOException e) { LOGGER.error("Unable to create/modify config file!", e); } - LOGGER.debug("Config initialized with values: destroyTime={}, explosionResist={}, miningLevel={}", destroyTime, explosionResist, miningLevel); + LOGGER.debug("Config initialized with values: destroyTime={}, explosionResist={}", destroyTime, explosionResist); } @ExpectPlatform diff --git a/gradle.properties b/gradle.properties index 4a62e33..2909587 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ minecraft_version=1.21.1 enabled_platforms=fabric,neoforge mod_id=breakingbedrock -mod_version=1.1.0 +mod_version=1.1.1 maven_group=net.anawesomguy.breakingbedrock description=Allow bedrock to be mined with a netherite pickaxe! github=AnAwesomGuy/breakingbedrock @@ -15,7 +15,7 @@ fabric_api_version=0.105.0+1.21.1 neoforge_version=21.1.63 -changelog=port to 1.21! +changelog=this is kinda stupid ngl curseforge_id=1017910 modrinth_id=s0tNTkDN diff --git a/neoforge/src/main/resources/data/forge/tags/block/needs_netherite_tool.json b/neoforge/src/main/resources/data/forge/tags/block/needs_netherite_tool.json index 803012e..e9665df 100644 --- a/neoforge/src/main/resources/data/forge/tags/block/needs_netherite_tool.json +++ b/neoforge/src/main/resources/data/forge/tags/block/needs_netherite_tool.json @@ -1,4 +1,9 @@ { + "neoforge:conditions": [ + { + "type": "neoforge:false" + } + ], "values": [ "bedrock" ]