Fix alternatives button showing up when not allowed
This commit is contained in:
@@ -191,13 +191,13 @@ public abstract class BaseScreen<T extends Container> extends ContainerScreen<T>
|
|||||||
slot.slotNumber,
|
slot.slotNumber,
|
||||||
slot.getStack(),
|
slot.getStack(),
|
||||||
slot.getSlotStackLimit(),
|
slot.getSlotStackLimit(),
|
||||||
parent -> new AlternativesScreen(
|
((FilterSlot) slot).isAlternativesAllowed() ? (parent -> new AlternativesScreen(
|
||||||
parent,
|
parent,
|
||||||
minecraft.player,
|
minecraft.player,
|
||||||
new TranslationTextComponent("gui.refinedstorage.alternatives"),
|
new TranslationTextComponent("gui.refinedstorage.alternatives"),
|
||||||
slot.getStack(),
|
slot.getStack(),
|
||||||
slot.getSlotIndex()
|
slot.getSlotIndex()
|
||||||
)
|
)) : null
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -220,13 +220,13 @@ public abstract class BaseScreen<T extends Container> extends ContainerScreen<T>
|
|||||||
slot.slotNumber,
|
slot.slotNumber,
|
||||||
stack,
|
stack,
|
||||||
((FluidFilterSlot) slot).getFluidInventory().getMaxAmount(),
|
((FluidFilterSlot) slot).getFluidInventory().getMaxAmount(),
|
||||||
parent -> new AlternativesScreen(
|
((FluidFilterSlot) slot).isAlternativesAllowed() ? (parent -> new AlternativesScreen(
|
||||||
this,
|
this,
|
||||||
minecraft.player,
|
minecraft.player,
|
||||||
new TranslationTextComponent("gui.refinedstorage.alternatives"),
|
new TranslationTextComponent("gui.refinedstorage.alternatives"),
|
||||||
stack,
|
stack,
|
||||||
slot.getSlotIndex()
|
slot.getSlotIndex()
|
||||||
)
|
)) : null
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import org.apache.commons.lang3.tuple.Pair;
|
|||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
// TODO here too
|
|
||||||
public class FluidAmountScreen extends AmountSpecifyingScreen<FluidAmountContainer> {
|
public class FluidAmountScreen extends AmountSpecifyingScreen<FluidAmountContainer> {
|
||||||
private int containerSlot;
|
private int containerSlot;
|
||||||
private FluidStack stack;
|
private FluidStack stack;
|
||||||
|
|||||||
Reference in New Issue
Block a user