diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index 057732da..80e511ca 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -2,10 +2,12 @@ Version 2.2.1 ------------------------------------------------------ Changes +- Added dense ME Conduits +- Added config to stop travel anchor going through unbreakable blocks +- Added underground biomes support to SAG Mill - #1223 Various small GUI- and NEI-related improvements and tweaks (Tonius) - #1232 Painted Glowstone now implements IFacade and will have connected textures with chisel -- Add dense ME Conduits -- Add config to stop travel anchor going through unbreakable blocks +- #1238, #1251 Improved control and modification of grinding balls via the SAGMillRecipes_User.xml file Bugs - #1226 Redstone color not showing on MFR machines / BR ports @@ -16,6 +18,7 @@ Bugs - #1248 Farming Station performance issue when large tree farm has no axe - #1259 shift right click on vacuum chest with a wrench causes it to disappear - Power conduits will now connect to blocks implementing IEnergyConnection +- Fixed SAG Mill recipes for BoP bone segments ------------------------------------------------------ Version 2.2.0 diff --git a/resources/assets/enderio/config/SAGMillRecipes_Core.xml b/resources/assets/enderio/config/SAGMillRecipes_Core.xml index 9d5d4bf9..b0fda341 100644 --- a/resources/assets/enderio/config/SAGMillRecipes_Core.xml +++ b/resources/assets/enderio/config/SAGMillRecipes_Core.xml @@ -1,22 +1,24 @@ @@ -95,7 +135,7 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + @@ -104,22 +144,22 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + - + - - - + + + - + - + @@ -129,15 +169,15 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - - - - + + + + - + @@ -150,9 +190,9 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - - - + + + @@ -167,7 +207,7 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + @@ -180,34 +220,34 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + - + - + - + - + - + - + - + - + @@ -219,44 +259,44 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - - + + - + - - + + - + - + - + - - - + + + - - + + @@ -265,21 +305,21 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + - + - + - - - + + + @@ -289,111 +329,111 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + - + - + - + - + - + - - + + - - + + - + - + - - - - + + + + - + - + - - + + - - + + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - - + + @@ -408,7 +448,7 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + @@ -427,7 +467,7 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + @@ -447,7 +487,7 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + @@ -508,19 +548,19 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + - + - - + + - + - - + + @@ -603,7 +643,7 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + @@ -616,7 +656,7 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + @@ -624,17 +664,17 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + - - + + - + @@ -644,23 +684,23 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + - + - + - + @@ -669,7 +709,7 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + @@ -683,11 +723,11 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - + - + @@ -1644,26 +1684,318 @@ FMLInterModComms.sendMessage("EnderIO", "recipe:sagmill", recipe); - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - - + + + + + + - + - + diff --git a/resources/assets/enderio/config/SAGMillRecipes_User.xml b/resources/assets/enderio/config/SAGMillRecipes_User.xml index e1918671..82a2bc16 100644 --- a/resources/assets/enderio/config/SAGMillRecipes_User.xml +++ b/resources/assets/enderio/config/SAGMillRecipes_User.xml @@ -79,295 +79,29 @@ found in the core file. --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/java/crazypants/enderio/machine/crusher/CrusherRecipeManager.java b/src/main/java/crazypants/enderio/machine/crusher/CrusherRecipeManager.java index 8258a9b4..05ce4073 100644 --- a/src/main/java/crazypants/enderio/machine/crusher/CrusherRecipeManager.java +++ b/src/main/java/crazypants/enderio/machine/crusher/CrusherRecipeManager.java @@ -4,7 +4,6 @@ import java.io.File; import java.util.ArrayList; import java.util.HashSet; import java.util.List; -import java.util.Map; import java.util.Set; import net.minecraft.item.ItemStack; @@ -117,7 +116,7 @@ public class CrusherRecipeManager { public void loadRecipesFromConfig() { GrindingBallTagHandler th = new GrindingBallTagHandler(); RecipeConfig config = RecipeConfig.loadRecipeConfig(CORE_FILE_NAME, CUSTOM_FILE_NAME, th); - balls.addAll(th.balls); + balls.addAll(th.balls.values()); ballExcludes.addAll(th.excludes); Log.info("Loaded " + balls.size() + " grinding balls from SAG Mill config."); Log.info("Excluding " + ballExcludes.size() + " recipes from grinding balls bonus."); diff --git a/src/main/java/crazypants/enderio/machine/crusher/GrindingBallTagHandler.java b/src/main/java/crazypants/enderio/machine/crusher/GrindingBallTagHandler.java index b26f5536..20c12295 100644 --- a/src/main/java/crazypants/enderio/machine/crusher/GrindingBallTagHandler.java +++ b/src/main/java/crazypants/enderio/machine/crusher/GrindingBallTagHandler.java @@ -1,11 +1,14 @@ package crazypants.enderio.machine.crusher; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.xml.sax.Attributes; import org.xml.sax.SAXException; +import crazypants.enderio.Log; import crazypants.enderio.machine.recipe.CustomTagHandler; import crazypants.enderio.machine.recipe.RecipeConfigParser; import crazypants.enderio.machine.recipe.RecipeInput; @@ -18,17 +21,20 @@ public class GrindingBallTagHandler implements CustomTagHandler { private static final String EXCLUDES_ROOT = "excludes"; + private static final String AT_ID = "id"; + private static final String AT_REMOVE = "remove"; private static final String AT_GM = "grindingMultiplier"; private static final String AT_PM = "powerMultiplier"; private static final String AT_CM = "chanceMultiplier"; private static final String AT_DMJ = "durationRF"; - List balls = new ArrayList(); + Map balls = new HashMap(); List excludes = new ArrayList(); boolean processStack = false; boolean processExclude = false; + private String id; private float gm; private float pm; private float cm; @@ -40,6 +46,23 @@ public class GrindingBallTagHandler implements CustomTagHandler { return true; } if(BALL_ROOT.equals(localName)) { + id = RecipeConfigParser.getStringValue(AT_ID, attributes, null); + if(id == null) { + Log.warn("GrindingBallTagHandler: grinding ball specified without the '" + AT_ID + "' attribute. It will be ignored."); + processStack = false; + return true; + } + boolean remove = RecipeConfigParser.getBooleanValue(AT_REMOVE, attributes, false); + if(remove) { + GrindingBall res = balls.remove(id); + if(res == null) { + Log.warn("User config requested removal of grinding ball with id: " + id + " but it was not found."); + } else { + Log.info("Removed grinding ball with id=" + id + " due to user config."); + } + processStack = false; + return true; + } gm = RecipeConfigParser.getFloatValue(AT_GM, attributes, 1); cm = RecipeConfigParser.getFloatValue(AT_CM, attributes, 1); pm = RecipeConfigParser.getFloatValue(AT_PM, attributes, 1); @@ -55,13 +78,19 @@ public class GrindingBallTagHandler implements CustomTagHandler { RecipeInput ri = RecipeConfigParser.getItemStack(attributes); if(ri != null) { GrindingBall gb = new GrindingBall(ri, gm, cm, pm, drf); - balls.add(gb); + balls.put(id, gb); } } if(processExclude && RecipeConfigParser.ELEMENT_ITEM_STACK.equals(localName)) { RecipeInput ri = RecipeConfigParser.getItemStack(attributes); if(ri != null) { - excludes.add(ri); + boolean remove = RecipeConfigParser.getBooleanValue(AT_REMOVE, attributes, false); + if(remove) { + excludes.remove(ri); + Log.info("Removed grinding ball exclude for " + ri.getInput().getDisplayName() + " due to user config."); + } else { + excludes.add(ri); + } } }