From 4be977b7285c4c57fd81a2b54a91c174d30976b6 Mon Sep 17 00:00:00 2001 From: Raven Szewczyk Date: Wed, 1 Feb 2023 16:52:21 +0000 Subject: [PATCH] Fix faucets not working, this logic was removed in Alexdoru's refactor (#70) * Fix faucets not working, this logic was removed in Alexdoru's refactor * Update dependencies --- build.gradle | 5 +- dependencies.gradle | 11 ++--- gradle.properties | 47 +++++++++++++++++++ repositories.gradle | 10 ---- .../nei/CraftingStationStackPositioner.java | 2 +- .../plugins/nei/RecipeHandlerBase.java | 8 ++-- .../smeltery/logic/FaucetLogic.java | 1 + 7 files changed, 61 insertions(+), 23 deletions(-) diff --git a/build.gradle b/build.gradle index fe8a2e7b..e2e8960e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -//version: 1675110695 +//version: 1675173326 /* DO NOT CHANGE THIS FILE! Also, you may replace this file at any time if there is an update available. @@ -66,7 +66,7 @@ plugins { id 'com.diffplug.spotless' version '6.7.2' apply false id 'com.modrinth.minotaur' version '2.+' apply false id 'com.matthewprenger.cursegradle' version '1.4.0' apply false - id 'com.gtnewhorizons.retrofuturagradle' version '1.1.2' + id 'com.gtnewhorizons.retrofuturagradle' version '1.1.3' } boolean settingsupdated = verifySettingsGradle() settingsupdated = verifyGitAttributes() || settingsupdated @@ -743,6 +743,7 @@ idea { module { downloadJavadoc = true downloadSources = true + inheritOutputDirs = true } project { settings { diff --git a/dependencies.gradle b/dependencies.gradle index e8528d1a..a97bf391 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -1,16 +1,15 @@ // Add your dependencies here dependencies { - compile("com.github.GTNewHorizons:Mantle:0.3.4:dev") - compile("com.github.GTNewHorizons:ForgeMultipart:1.2.7:dev") - compile("com.github.GTNewHorizons:NotEnoughItems:2.2.15-GTNH:dev") - compile("com.github.GTNewHorizons:CodeChickenLib:1.1.5.3:dev") + api("com.github.GTNewHorizons:Mantle:0.3.5:dev") + api("com.github.GTNewHorizons:ForgeMultipart:1.3.1:dev") + implementation("com.github.GTNewHorizons:NotEnoughItems:2.3.26-GTNH:dev") compileOnly("com.github.GTNewHorizons:inventory-tweaks:1.5.13:api") compileOnly("com.github.GTNewHorizons:waila:1.5.20:api") - compileOnly("com.github.GTNewHorizons:Battlegear2:master-SNAPSHOT:api") { + compileOnly("com.github.GTNewHorizons:Battlegear2:1.1.2.3:api") { transitive = false } - compile("curse.maven:cofh-core-69162:2388751") + implementation("curse.maven:cofh-core-69162:2388751") compileOnly("curse.maven:minefactory-reloaded-66672:2366150") compileOnly("curse.maven:zelda-sword-skills-220540:2384889") compileOnly("curse.maven:dynamic-sword-skills-226360:2495462") diff --git a/gradle.properties b/gradle.properties index c091b7ce..14eea631 100644 --- a/gradle.properties +++ b/gradle.properties @@ -58,3 +58,50 @@ containsMixinsAndOrCoreModOnly = false # If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your # responsibility check the licence and request permission for distribution, if required. usesShadowedDependencies = false + +# Adds the GTNH maven, CurseMaven, IC2/Player maven, and some more well-known 1.7.10 repositories +includeWellKnownRepositories = true + +# Publishing to modrinth requires you to set the MODRINTH_TOKEN environment variable to your current modrinth API token. + +# The project's ID on Modrinth. Can be either the slug or the ID. +# Leave this empty if you don't want to publish on Modrinth. +modrinthProjectId = + +# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth. +# Syntax: scope1-type1:name1;scope2-type2:name2;... +# Where scope can be one of [required, optional, incompatible, embedded], +# type can be one of [project, version], +# and the name is the Modrinth project or version slug/id of the other mod. +# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech +# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true +modrinthRelations = + + +# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens. + +# The project's numeric ID on CurseForge. You can find this in the About Project box. +# Leave this empty if you don't want to publish on CurseForge. +curseForgeProjectId = + +# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge. +# Syntax: type1:name1;type2:name2;... +# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible], +# and the name is the CurseForge project slug of the other mod. +# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft +# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true +curseForgeRelations = + + +# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older +# projects. New projects should not use this parameter. +# customArchiveBaseName = + +# Optional parameter to prevent the source code from being published +# noPublishedSources = + +# Uncomment this to disable spotless checks +# This should only be uncommented to keep it easier to sync with upstream/other forks. +# That is, if there is no other active fork/upstream, NEVER change this. +# disableSpotless = true + diff --git a/repositories.gradle b/repositories.gradle index 77f2a1b9..45729e10 100644 --- a/repositories.gradle +++ b/repositories.gradle @@ -1,14 +1,4 @@ // Add any additional repositiroes for your dependencies here repositories { - maven { - name = "GTNH Maven" - url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/" - } - maven { - url "https://cursemaven.com" - } - maven { - url = "https://jitpack.io" - } } diff --git a/src/main/java/tconstruct/plugins/nei/CraftingStationStackPositioner.java b/src/main/java/tconstruct/plugins/nei/CraftingStationStackPositioner.java index 443feec5..7c8d845a 100644 --- a/src/main/java/tconstruct/plugins/nei/CraftingStationStackPositioner.java +++ b/src/main/java/tconstruct/plugins/nei/CraftingStationStackPositioner.java @@ -16,7 +16,7 @@ public class CraftingStationStackPositioner implements IStackPositioner { public ArrayList positionStacks(ArrayList stacks) { if (Minecraft.getMinecraft().currentScreen instanceof GuiRecipe) { - GuiRecipe recipeGui = (GuiRecipe) Minecraft.getMinecraft().currentScreen; + GuiRecipe recipeGui = (GuiRecipe) Minecraft.getMinecraft().currentScreen; if (!(recipeGui.firstGui instanceof CraftingStationGui)) { TConstruct.logger.warn("No CraftingStationGui found!"); diff --git a/src/main/java/tconstruct/plugins/nei/RecipeHandlerBase.java b/src/main/java/tconstruct/plugins/nei/RecipeHandlerBase.java index f99a855d..14940bdf 100644 --- a/src/main/java/tconstruct/plugins/nei/RecipeHandlerBase.java +++ b/src/main/java/tconstruct/plugins/nei/RecipeHandlerBase.java @@ -92,7 +92,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler { } @Override - public List handleTooltip(GuiRecipe guiRecipe, List currenttip, int recipe) { + public List handleTooltip(GuiRecipe guiRecipe, List currenttip, int recipe) { super.handleTooltip(guiRecipe, currenttip, recipe); CachedBaseRecipe crecipe = (CachedBaseRecipe) this.arecipes.get(recipe); if (GuiContainerManager.shouldShowTooltip(guiRecipe)) { @@ -112,7 +112,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler { } @Override - public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe) { + public boolean keyTyped(GuiRecipe gui, char keyChar, int keyCode, int recipe) { if (keyCode == NEIClientConfig.getKeyBinding("gui.recipe")) { if (this.transferFluidTank(gui, recipe, false)) { return true; @@ -126,7 +126,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler { } @Override - public boolean mouseClicked(GuiRecipe gui, int button, int recipe) { + public boolean mouseClicked(GuiRecipe gui, int button, int recipe) { if (button == 0) { if (this.transferFluidTank(gui, recipe, false)) { return true; @@ -139,7 +139,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler { return super.mouseClicked(gui, button, recipe); } - protected boolean transferFluidTank(GuiRecipe guiRecipe, int recipe, boolean usage) { + protected boolean transferFluidTank(GuiRecipe guiRecipe, int recipe, boolean usage) { CachedBaseRecipe crecipe = (CachedBaseRecipe) this.arecipes.get(recipe); Point mouse = GuiDraw.getMousePosition(); Point offset = guiRecipe.getRecipePosition(recipe); diff --git a/src/main/java/tconstruct/smeltery/logic/FaucetLogic.java b/src/main/java/tconstruct/smeltery/logic/FaucetLogic.java index b5f6ea86..4190bc2c 100644 --- a/src/main/java/tconstruct/smeltery/logic/FaucetLogic.java +++ b/src/main/java/tconstruct/smeltery/logic/FaucetLogic.java @@ -151,6 +151,7 @@ public class FaucetLogic extends TileEntity implements IFacingLogic, IActiveLogi @Override public void setActive(boolean flag) { if (!active) { + active = true; active = activateFaucet(); } else { active = false;