Prevent JEI crash - needs to run on main thread.
This commit is contained in:
@@ -92,7 +92,10 @@ public abstract class ContainerBase extends Container {
|
|||||||
} else if (slot.getHasStack()) {
|
} else if (slot.getHasStack()) {
|
||||||
if (slot instanceof SlotFilterType && ((SlotFilterType) slot).getType().getType() == IType.FLUIDS) {
|
if (slot instanceof SlotFilterType && ((SlotFilterType) slot).getType().getType() == IType.FLUIDS) {
|
||||||
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
|
||||||
FMLClientHandler.instance().showGuiScreen(new GuiGridPatternFluidAmount((GuiBase) Minecraft.getMinecraft().currentScreen, player, slot.getSlotIndex(), ((SlotFilterType) slot).getActualStack()));
|
Minecraft.getMinecraft().addScheduledTask(() -> {
|
||||||
|
// Prevent JEI crash - this needs to run on the main thread and not on the packet handler thread
|
||||||
|
FMLClientHandler.instance().showGuiScreen(new GuiGridPatternFluidAmount((GuiBase) Minecraft.getMinecraft().currentScreen, player, slot.getSlotIndex(), ((SlotFilterType) slot).getActualStack()));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
slot.getStack().setCount(((SlotFilter) slot).getAmountModified(dragType));
|
slot.getStack().setCount(((SlotFilter) slot).getAmountModified(dragType));
|
||||||
|
|||||||
Reference in New Issue
Block a user