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
This commit is contained in:
Raven Szewczyk authored and GitHub committed 2023-02-01 17:52:21 +01:00
1 parent c76eca4f1b
commit 4be977b728
7 files changed
+61 -23

No files matched your search

@@ -16,7 +16,7 @@ public class CraftingStationStackPositioner implements IStackPositioner {
public ArrayList<PositionedStack> positionStacks(ArrayList<PositionedStack> 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!");
@@ -92,7 +92,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
}
@Override
public List<String> handleTooltip(GuiRecipe guiRecipe, List<String> currenttip, int recipe) {
public List<String> handleTooltip(GuiRecipe<?> guiRecipe, List<String> 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);
@@ -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;