diff --git a/build.gradle b/build.gradle index a1ea829..35f88d5 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ buildscript { apply plugin: 'net.minecraftforge.gradle.forge' -version = "1.12.2-0.3.8" +version = "1.12.2-0.3.9" group = "com.charles445.simpledifficulty" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "SimpleDifficulty" diff --git a/src/main/java/com/charles445/simpledifficulty/SimpleDifficulty.java b/src/main/java/com/charles445/simpledifficulty/SimpleDifficulty.java index a320877..3184ff7 100644 --- a/src/main/java/com/charles445/simpledifficulty/SimpleDifficulty.java +++ b/src/main/java/com/charles445/simpledifficulty/SimpleDifficulty.java @@ -33,7 +33,7 @@ public class SimpleDifficulty { public static final String MODID = "simpledifficulty"; public static final String NAME = "SimpleDifficulty"; - public static final String VERSION = "0.3.8"; + public static final String VERSION = "0.3.9"; @Mod.Instance(SimpleDifficulty.MODID) public static SimpleDifficulty instance; diff --git a/src/main/java/com/charles445/simpledifficulty/api/config/ServerOptions.java b/src/main/java/com/charles445/simpledifficulty/api/config/ServerOptions.java index bbb6844..829a484 100644 --- a/src/main/java/com/charles445/simpledifficulty/api/config/ServerOptions.java +++ b/src/main/java/com/charles445/simpledifficulty/api/config/ServerOptions.java @@ -11,7 +11,8 @@ public enum ServerOptions implements IConfigOption /*Boolean*/ TEMPERATURE_TE_ENABLED ("temperatureTEEnabled"), /*Integer*/ CANTEEN_DOSES ("canteenDoses"), /*Boolean*/ STRICT_HEATERS ("strictHeaters"), - /*Integer*/ IRON_CANTEEN_DOSES ("ironCanteenDoses"); + /*Integer*/ IRON_CANTEEN_DOSES ("ironCanteenDoses"), + /*Boolean*/ INFINITE_PURIFIED_WATER ("infinitePurifiedWater"); String name; diff --git a/src/main/java/com/charles445/simpledifficulty/compat/mod/InspirationsHandler.java b/src/main/java/com/charles445/simpledifficulty/compat/mod/InspirationsHandler.java index 08aa9b7..aa247e9 100644 --- a/src/main/java/com/charles445/simpledifficulty/compat/mod/InspirationsHandler.java +++ b/src/main/java/com/charles445/simpledifficulty/compat/mod/InspirationsHandler.java @@ -297,5 +297,11 @@ public SoundEvent getSound(ItemStack stack, boolean boiling, int level, Cauldron { return SoundEvents.ITEM_BUCKET_FILL; } + + @Override + public ItemStack transformInput(ItemStack stack, boolean boiling, int level, CauldronState state) + { + return stack; + } } } diff --git a/src/main/java/com/charles445/simpledifficulty/compat/shadow/InspirationsShadow.java b/src/main/java/com/charles445/simpledifficulty/compat/shadow/InspirationsShadow.java index 3e73851..2f5908b 100644 --- a/src/main/java/com/charles445/simpledifficulty/compat/shadow/InspirationsShadow.java +++ b/src/main/java/com/charles445/simpledifficulty/compat/shadow/InspirationsShadow.java @@ -16,6 +16,8 @@ public static interface ICauldronRecipe SoundEvent getSound(ItemStack stack, boolean boiling, int level, CauldronState state); + ItemStack transformInput(ItemStack stack, boolean boiling, int level, CauldronState state); + int getLevel(int level); public class CauldronState diff --git a/src/main/java/com/charles445/simpledifficulty/config/ModConfig.java b/src/main/java/com/charles445/simpledifficulty/config/ModConfig.java index f3354e1..f660e09 100644 --- a/src/main/java/com/charles445/simpledifficulty/config/ModConfig.java +++ b/src/main/java/com/charles445/simpledifficulty/config/ModConfig.java @@ -1,10 +1,6 @@ package com.charles445.simpledifficulty.config; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.List; - import com.charles445.simpledifficulty.SimpleDifficulty; import com.charles445.simpledifficulty.api.config.ClientConfig; import com.charles445.simpledifficulty.api.config.ClientOptions; @@ -97,6 +93,10 @@ public static class ConfigServerConfig @Config.RangeInt(min=1) public int ironCanteenDoses = 8; + @Config.Comment("Whether purified water blocks are infinite") + @Config.Name("Infinite Purified Water") + public boolean infinitePurifiedWater = false; + @Config.Comment("Spams chat with debug messages, do not enable this unless you are testing!") @Config.Name("DebugMode") public boolean debug = false; @@ -528,6 +528,7 @@ public static void sendLocalServerConfigToAPI() ServerConfig.instance.put(ServerOptions.CANTEEN_DOSES, server.canteenDoses); ServerConfig.instance.put(ServerOptions.STRICT_HEATERS, server.strictHeaters); ServerConfig.instance.put(ServerOptions.IRON_CANTEEN_DOSES, server.ironCanteenDoses); + ServerConfig.instance.put(ServerOptions.INFINITE_PURIFIED_WATER, server.infinitePurifiedWater); } private static MessageUpdateConfig getNewConfigMessage() @@ -544,6 +545,7 @@ private static MessageUpdateConfig getNewConfigMessage() compound.setString(ServerOptions.CANTEEN_DOSES.getName(), ""+server.canteenDoses); compound.setString(ServerOptions.STRICT_HEATERS.getName(), ""+server.strictHeaters); compound.setString(ServerOptions.IRON_CANTEEN_DOSES.getName(), ""+server.ironCanteenDoses); + compound.setString(ServerOptions.INFINITE_PURIFIED_WATER.getName(), ""+server.infinitePurifiedWater); return new MessageUpdateConfig(compound); } diff --git a/src/main/java/com/charles445/simpledifficulty/util/internal/ThirstUtilInternal.java b/src/main/java/com/charles445/simpledifficulty/util/internal/ThirstUtilInternal.java index 8d4ff44..17b59ab 100644 --- a/src/main/java/com/charles445/simpledifficulty/util/internal/ThirstUtilInternal.java +++ b/src/main/java/com/charles445/simpledifficulty/util/internal/ThirstUtilInternal.java @@ -45,10 +45,11 @@ public static ThirstEnumBlockPos traceWaterToDrink(EntityPlayer player) if(traceResult.thirstEnum == ThirstEnum.PURIFIED) { - if(ServerConfig.instance.getBoolean(ServerOptions.THIRST_DRINK_BLOCKS)) - player.world.setBlockToAir(traceResult.pos); - else + if(!ServerConfig.instance.getBoolean(ServerOptions.THIRST_DRINK_BLOCKS)) return null; + + if(!ServerConfig.instance.getBoolean(ServerOptions.INFINITE_PURIFIED_WATER)) + player.world.setBlockToAir(traceResult.pos); } else if(traceResult.thirstEnum == ThirstEnum.RAIN && !ServerConfig.instance.getBoolean(ServerOptions.THIRST_DRINK_RAIN)) {