Fix alternatives button showing up when not allowed

This commit is contained in:
raoulvdberge
2019-11-11 16:50:03 +01:00
parent dcefbf0a0a
commit 03287f071a
2 changed files with 4 additions and 5 deletions

View File

@@ -191,13 +191,13 @@ public abstract class BaseScreen<T extends Container> extends ContainerScreen<T>
slot.slotNumber,
slot.getStack(),
slot.getSlotStackLimit(),
parent -> new AlternativesScreen(
((FilterSlot) slot).isAlternativesAllowed() ? (parent -> new AlternativesScreen(
parent,
minecraft.player,
new TranslationTextComponent("gui.refinedstorage.alternatives"),
slot.getStack(),
slot.getSlotIndex()
)
)) : null
));
}
}
@@ -220,13 +220,13 @@ public abstract class BaseScreen<T extends Container> extends ContainerScreen<T>
slot.slotNumber,
stack,
((FluidFilterSlot) slot).getFluidInventory().getMaxAmount(),
parent -> new AlternativesScreen(
((FluidFilterSlot) slot).isAlternativesAllowed() ? (parent -> new AlternativesScreen(
this,
minecraft.player,
new TranslationTextComponent("gui.refinedstorage.alternatives"),
stack,
slot.getSlotIndex()
)
)) : null
));
}
} else {

View File

@@ -14,7 +14,6 @@ import org.apache.commons.lang3.tuple.Pair;
import javax.annotation.Nullable;
import java.util.function.Function;
// TODO here too
public class FluidAmountScreen extends AmountSpecifyingScreen<FluidAmountContainer> {
private int containerSlot;
private FluidStack stack;