diff --git a/contrib/wrench.xcf b/contrib/wrench.xcf index 7129862..44c9386 100644 Binary files a/contrib/wrench.xcf and b/contrib/wrench.xcf differ diff --git a/dependencies.gradle b/dependencies.gradle index 2726a8c..61156ad 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,18 +1,18 @@ // Add your dependencies here dependencies { - api('com.github.GTNewHorizons:Botania:1.12.22-GTNH:dev') - api('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.429:dev') + api('com.github.GTNewHorizons:Botania:1.13.6-GTNH:dev') + api('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.126:dev') api('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') - api("com.github.GTNewHorizons:StructureLib:1.4.18:dev") - api("com.github.GTNewHorizons:Avaritia:1.72:dev") + api("com.github.GTNewHorizons:StructureLib:1.4.24:dev") + api("com.github.GTNewHorizons:Avaritia:1.78:dev") - compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.7.77-GTNH:dev') - compileOnly("com.github.GTNewHorizons:Chisel:2.16.11-GTNH:dev") {transitive = false} + compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.8.40-GTNH:dev') + compileOnly("com.github.GTNewHorizons:Chisel:2.17.5-GTNH:dev") {transitive = false} - runtimeOnly('com.github.GTNewHorizons:Baubles-Expanded:2.1.13-GTNH:dev') + runtimeOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.2-GTNH:dev') - devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.7.77-GTNH:dev') + devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.40-GTNH:dev') } repositories { diff --git a/gradle.properties b/gradle.properties index 8170ff1..f22f2eb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -96,7 +96,9 @@ usesMixinDebug = false # Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise. mixinPlugin = -# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! +# Specify the package that contains all of your Mixins. The package must exist or +# the build will fail. If you have a package property defined in your mixins..json, +# it must match with this or the build will fail. mixinsPackage = # Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! @@ -172,6 +174,12 @@ curseForgeRelations = # projects. New projects should not use this parameter. customArchiveBaseName = BotanicHorizons +# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory. +# runClientWorkingDirectory = run/client + +# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory. +# runServerWorkingDirectory = run/server + # Optional parameter to have the build automatically fail if an illegal version is used. # This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'. # The check is ONLY performed if the version is a git tag. diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 9bbc975..1b33c55 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 37f853b..d4081da 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index faf9300..23d15a9 100755 --- a/gradlew +++ b/gradlew @@ -114,7 +114,7 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar +CLASSPATH="\\\"\\\"" # Determine the Java command to use to start the JVM. @@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat index 9d21a21..db3a6ac 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -70,11 +70,11 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar +set CLASSPATH= @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell diff --git a/settings.gradle b/settings.gradle index 1b22f8d..becf041 100644 --- a/settings.gradle +++ b/settings.gradle @@ -17,5 +17,5 @@ pluginManagement { } plugins { - id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.41' + id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.48' } diff --git a/src/main/java/net/fuzzycraft/botanichorizons/addons/tileentity/TileAdvancedManaPool.java b/src/main/java/net/fuzzycraft/botanichorizons/addons/tileentity/TileAdvancedManaPool.java index 39eb31c..9e29fdb 100644 --- a/src/main/java/net/fuzzycraft/botanichorizons/addons/tileentity/TileAdvancedManaPool.java +++ b/src/main/java/net/fuzzycraft/botanichorizons/addons/tileentity/TileAdvancedManaPool.java @@ -1,11 +1,15 @@ package net.fuzzycraft.botanichorizons.addons.tileentity; +import cpw.mods.fml.common.FMLLog; import net.fuzzycraft.botanichorizons.util.Facing2D; import net.fuzzycraft.botanichorizons.util.multiblock.MultiblockHelper; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import vazkii.botania.api.recipe.RecipeManaInfusion; +import vazkii.botania.common.block.tile.mana.TilePool; import static net.fuzzycraft.botanichorizons.util.Constants.MC_BLOCK_SEND_TO_CLIENT; import static net.fuzzycraft.botanichorizons.util.Constants.MC_BLOCK_UPDATE; @@ -54,10 +58,17 @@ protected void updateEntityCrafting() { @Override public int getAvailableParallels(@NotNull RecipeManaInfusion recipe) { int parallel = MAX_PARALLELS; - int recipeManaCost = recipe.getManaToConsume(); + + if (parallel * recipeManaCost < storedMana) { + return parallel; + } + + int externalMana = getExternalMana(); + int totalReservoir = storedMana + externalMana; + if (recipeManaCost > 0) { - int manaParallel = storedMana / recipeManaCost; + int manaParallel = totalReservoir / recipeManaCost; parallel = Math.min(parallel, manaParallel); } @@ -67,8 +78,42 @@ public int getAvailableParallels(@NotNull RecipeManaInfusion recipe) { @Override void consumeNonItemResources(RecipeManaInfusion recipe, int parallel) { storedMana -= parallel * recipe.getManaToConsume(); + + if (storedMana < 0) { + int deficit = -storedMana; + TilePool pool = getExternalPool(); + if (pool != null && pool.getCurrentMana() >= deficit) { + pool.recieveMana(-deficit); + storedMana = 0; + } else { + FMLLog.bigWarning("Exploit: External mana is no longer available"); + isOnline = false; + worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, facing.index << 1, MC_BLOCK_UPDATE + MC_BLOCK_SEND_TO_CLIENT); + } + } } + @Nullable + private TilePool getExternalPool() { + int poolX = xCoord - 4 * facing.dx; + int poolZ = zCoord - 4 * facing.dz; + int poolY = yCoord + 1; + TileEntity rawPoolTE = worldObj.getTileEntity(poolX, poolY, poolZ); + if (rawPoolTE instanceof TilePool pool) { + return pool; + } else { + FMLLog.warning("Not a pool at %d %d %d", poolX, poolY, poolZ); + return null; + } + } + + private int getExternalMana() { + TilePool pool = getExternalPool(); + return (pool != null) ? pool.getCurrentMana() : 0; + } + + // SimpleAutomationTileEntity + @Override public int getRecipeInputStackSize(@NotNull RecipeManaInfusion recipe) { return 1; diff --git a/src/main/java/net/fuzzycraft/botanichorizons/mod/ForgeMod.java b/src/main/java/net/fuzzycraft/botanichorizons/mod/ForgeMod.java index 597f706..89d51b7 100644 --- a/src/main/java/net/fuzzycraft/botanichorizons/mod/ForgeMod.java +++ b/src/main/java/net/fuzzycraft/botanichorizons/mod/ForgeMod.java @@ -33,7 +33,7 @@ public class ForgeMod { public static final String MOD_NAME = MOD_ID; public static final String VERSION = "GRADLETOKEN_VERSION"; - public static final String DEPENDENCIES = "required-after:Baubles;required-after:Thaumcraft;required-after:Botania;required-after:gregtech;after:witchery;after:BiomesOPlenty;after:dreamcraft;required-after:TConstruct;required-after:Avaritia;after:chisel;after:StructureLib"; + public static final String DEPENDENCIES = "required-after:Baubles;required-after:Thaumcraft;required-after:Botania;required-after:gregtech;after:witchery;after:BiomesOPlenty;after:dreamcraft;required-after:TConstruct;required-after:Avaritia;after:chisel;after:StructureLib;after:etfuturum"; //public static final String DEPENDENCIES = "required-after:Botania"; // developer mode @Mod.Instance(MOD_ID) diff --git a/src/main/java/net/fuzzycraft/botanichorizons/patches/ApothecaryPatches.java b/src/main/java/net/fuzzycraft/botanichorizons/patches/ApothecaryPatches.java index a51ee0b..791abed 100644 --- a/src/main/java/net/fuzzycraft/botanichorizons/patches/ApothecaryPatches.java +++ b/src/main/java/net/fuzzycraft/botanichorizons/patches/ApothecaryPatches.java @@ -31,6 +31,13 @@ public static void applyPatches() { whitelistBlockIfExists("BiomesOPlenty:ivy"); whitelistBlockIfExists("BiomesOPlenty:flowerVine"); whitelistBlockIfExists("Natura:Thornvines"); + whitelistBlockIfExists("etfuturum:lily_of_the_valley"); + whitelistBlockIfExists("etfuturum:cornflower"); + whitelistBlockIfExists("etfuturum:wither_rose"); + whitelistBlockIfExists("etfuturum:rose"); + whitelistBlockIfExists("etfuturum:pink_petals"); + whitelistBlockIfExists("etfuturum:cave_vine"); + whitelistBlockIfExists("etfuturum:cave_vine_plant"); CustomBotaniaAPI.extraFlowerComponents.put(Item.getItemFromBlock(Blocks.red_flower), alwaysAllowHandler); CustomBotaniaAPI.extraFlowerComponents.put(Item.getItemFromBlock(Blocks.yellow_flower), alwaysAllowHandler); CustomBotaniaAPI.extraFlowerComponents.put(Item.getItemFromBlock(Blocks.vine), alwaysAllowHandler); diff --git a/src/main/java/net/fuzzycraft/botanichorizons/patches/GregtechPatches.java b/src/main/java/net/fuzzycraft/botanichorizons/patches/GregtechPatches.java index 73da33f..0f483e3 100644 --- a/src/main/java/net/fuzzycraft/botanichorizons/patches/GregtechPatches.java +++ b/src/main/java/net/fuzzycraft/botanichorizons/patches/GregtechPatches.java @@ -10,7 +10,6 @@ import gregtech.api.util.GTModHandler; import gregtech.api.util.GTOreDictUnificator; import gregtech.api.util.GTRecipeBuilder; -import gregtech.api.util.GTUtility; import net.fuzzycraft.botanichorizons.addons.BHBlocks; import net.fuzzycraft.botanichorizons.util.Constants; import net.fuzzycraft.botanichorizons.util.OreDict; @@ -148,7 +147,8 @@ public static void applyPatches() { // Reeds compress to plantballs by default GTValues.RA.stdBuilder() - .itemInputs(new ItemStack(Items.reeds, 8), GTUtility.getIntegratedCircuit(16)) + .itemInputs(new ItemStack(Items.reeds, 8)) + .circuit(16) .itemOutputs(new ItemStack(ModBlocks.reedBlock)) .duration(4*SECONDS) .eut(24) @@ -157,8 +157,8 @@ public static void applyPatches() { // Livingwood and Crystal Bows GTValues.RA.stdBuilder() .itemInputs(new ItemStack(ModItems.manaResource, 3, Constants.MANARESOURCE_META_TWIG_WOOD), - new ItemStack(ModItems.manaResource, 3, Constants.MANARESOURCE_META_STRING), - GTUtility.getIntegratedCircuit(1)) + new ItemStack(ModItems.manaResource, 3, Constants.MANARESOURCE_META_STRING)) + .circuit(1) .itemOutputs(new ItemStack(ModItems.livingwoodBow)) .duration(4*SECONDS) .eut(24) @@ -184,7 +184,8 @@ public static void applyPatches() { 'S', LibOreDict.MANAWEAVE_CLOTH ); GTValues.RA.stdBuilder() - .itemInputs(fabric, new ItemStack(choice, 2, i % 16), GTUtility.getIntegratedCircuit(2)) + .itemInputs(fabric, new ItemStack(choice, 2, i % 16)) + .circuit(2) .itemOutputs(output) .duration(6*SECONDS) .eut(80) @@ -315,19 +316,13 @@ private static void compressAndExtract(ItemStack uncompressed, ItemStack compres addIC2CompressorRecipe(compressed, uncompressed); } - private static void addAssemblerCrafting(ItemStack output, int circuit, ItemStack... inputs) { + private static void addAssemblerCrafting(ItemStack output, int circuitNumber, ItemStack... inputs) { - Object[] realInputs; - if (circuit > 0) { - realInputs = new ItemStack[inputs.length + 1]; - System.arraycopy(inputs, 0, realInputs, 0, inputs.length); - realInputs[inputs.length] = GTUtility.getIntegratedCircuit(circuit); - } else { - realInputs = inputs; + GTRecipeBuilder recipeBuilder = GTValues.RA.stdBuilder(); + if (circuitNumber > 0) { + recipeBuilder.circuit(circuitNumber); } - - GTValues.RA.stdBuilder() - .itemInputs(realInputs) + recipeBuilder.itemInputs(inputs) .itemOutputs(output) .duration(5 * SECONDS) .eut(16) @@ -345,30 +340,27 @@ private static void addAssemblerArmour(ItemStack helmet, ItemStack chest, ItemSt addAssemblerCrafting(leggings, 7, new ItemStack(ingredient.getItem(), 7, ingredient.getItemDamage())); } if (boots != null) { - addAssemblerCrafting(boots, 4, new ItemStack(ingredient.getItem(), 4, ingredient.getItemDamage())); + addAssemblerCrafting(boots, 6, new ItemStack(ingredient.getItem(), 4, ingredient.getItemDamage())); } } @Nullable - private static IRecipe addSlabRecipe(ItemStack output, ItemStack input, int circuit, int volt, int ticks) { + private static IRecipe addSlabRecipe(ItemStack output, ItemStack input, int circuitNumber, int volt, int ticks) { + GTRecipeBuilder recipeBuilder = GTValues.RA.stdBuilder(); ItemStack[] inputs; - if (circuit == 0) { - inputs = new ItemStack[]{input}; - } else { - ItemStack circuitStack = GTUtility.getIntegratedCircuit(circuit); - inputs = new ItemStack[]{input, circuitStack}; + if (circuitNumber > 0) { + recipeBuilder.circuit(circuitNumber); } - GTValues.RA.stdBuilder() - .itemInputs(inputs) - .itemOutputs(output) - .duration(ticks) - .eut(volt) - .addTo(cutterRecipes); + recipeBuilder.itemInputs(input) + .itemOutputs(output) + .duration(ticks) + .eut(volt) + .addTo(cutterRecipes); if (volt < 32 && (output.stackSize % 2) == 0) { ItemStack half_output = new ItemStack(output.getItem(), output.stackSize / 2, output.getItemDamage()); - String r1 = (circuit <= 1) ? "sR" : "s "; - String r2 = (circuit <= 1) ? " " : "R "; + String r1 = (circuitNumber <= 1) ? "sR" : "s "; + String r2 = (circuitNumber <= 1) ? " " : "R "; GTModHandler.addCraftingRecipe( half_output, new Object[]{ diff --git a/src/main/java/net/fuzzycraft/botanichorizons/patches/OredictPatches.java b/src/main/java/net/fuzzycraft/botanichorizons/patches/OredictPatches.java index 845da5e..a186a70 100644 --- a/src/main/java/net/fuzzycraft/botanichorizons/patches/OredictPatches.java +++ b/src/main/java/net/fuzzycraft/botanichorizons/patches/OredictPatches.java @@ -45,6 +45,19 @@ private static void applyCrossModPatches() { oredictThirdPartyBlocks("BiomesOPlenty:mushrooms", "listInedibleMushroom", "listInedibleMushroom", "listInedibleMushroom", "listInedibleMushroom", "listInedibleMushroom", "listInedibleMushroom"); + oredictThirdPartyBlocks("etfuturum:lily_of_the_valley", "flowerWhite"); + oredictThirdPartyBlocks("etfuturum:lily_of_the_valley", "flowerLilyValley"); + oredictThirdPartyBlocks("etfuturum:cornflower", "flowerBlue"); + oredictThirdPartyBlocks("etfuturum:cornflower", "flowerCorn"); + oredictThirdPartyBlocks("etfuturum:wither_rose", "flowerBlack"); + oredictThirdPartyBlocks("etfuturum:wither_rose", "flowerRoseWither"); + oredictThirdPartyBlocks("etfuturum:rose", "flowerRed"); + oredictThirdPartyBlocks("etfuturum:rose", "flowerRose"); + oredictThirdPartyBlocks("etfuturum:pink_petals", "flowerPink"); + oredictThirdPartyBlocks("etfuturum:pink_petals", "flowerPinkPetals"); + + oredictThirdPartyBlocks("etfuturum:cave_vine", "cropVine"); + oredictThirdPartyBlocks("etfuturum:cave_vine_plant", "cropVine"); oredictThirdPartyItem("witchery:ingredient", 14, "itemMutandis"); } diff --git a/src/main/resources/assets/botanichorizons/textures/items/elvenDisassemblyWrench.png b/src/main/resources/assets/botanichorizons/textures/items/elvenDisassemblyWrench.png index 3148e37..0be8f92 100644 Binary files a/src/main/resources/assets/botanichorizons/textures/items/elvenDisassemblyWrench.png and b/src/main/resources/assets/botanichorizons/textures/items/elvenDisassemblyWrench.png differ diff --git a/src/main/resources/assets/botanichorizons/textures/items/elvenWrench.png b/src/main/resources/assets/botanichorizons/textures/items/elvenWrench.png index 66219eb..de5f5b2 100644 Binary files a/src/main/resources/assets/botanichorizons/textures/items/elvenWrench.png and b/src/main/resources/assets/botanichorizons/textures/items/elvenWrench.png differ diff --git a/src/main/resources/assets/botanichorizons/textures/items/manasteelSuperWrench.png b/src/main/resources/assets/botanichorizons/textures/items/manasteelSuperWrench.png index 9cd4d35..b8edfac 100644 Binary files a/src/main/resources/assets/botanichorizons/textures/items/manasteelSuperWrench.png and b/src/main/resources/assets/botanichorizons/textures/items/manasteelSuperWrench.png differ diff --git a/src/main/resources/assets/botanichorizons/textures/items/manasteelWrench.png b/src/main/resources/assets/botanichorizons/textures/items/manasteelWrench.png index 181100e..cb57c6e 100644 Binary files a/src/main/resources/assets/botanichorizons/textures/items/manasteelWrench.png and b/src/main/resources/assets/botanichorizons/textures/items/manasteelWrench.png differ diff --git a/src/main/resources/assets/botanichorizons/textures/items/terrasteelDisassemblyWrench.png b/src/main/resources/assets/botanichorizons/textures/items/terrasteelDisassemblyWrench.png index 164151f..934027d 100644 Binary files a/src/main/resources/assets/botanichorizons/textures/items/terrasteelDisassemblyWrench.png and b/src/main/resources/assets/botanichorizons/textures/items/terrasteelDisassemblyWrench.png differ diff --git a/src/main/resources/assets/botanichorizons/textures/items/terrasteelWrench.png b/src/main/resources/assets/botanichorizons/textures/items/terrasteelWrench.png index 694fa21..b4502c4 100644 Binary files a/src/main/resources/assets/botanichorizons/textures/items/terrasteelWrench.png and b/src/main/resources/assets/botanichorizons/textures/items/terrasteelWrench.png differ