use of net.minecraft.client.gui.screen.ingame.GenericContainerScreen in project Client by MatHax.
the class EChestMemory method onOpenScreenEvent.
@EventHandler
private static void onOpenScreenEvent(OpenScreenEvent event) {
if (echestOpenedState == 1 && event.screen instanceof GenericContainerScreen) {
echestOpenedState = 2;
return;
}
if (echestOpenedState == 0)
return;
if (!(mc.currentScreen instanceof GenericContainerScreen))
return;
GenericContainerScreenHandler container = ((GenericContainerScreen) mc.currentScreen).getScreenHandler();
if (container == null)
return;
Inventory inv = container.getInventory();
for (int i = 0; i < 27; i++) {
ITEMS.set(i, inv.getStack(i));
}
echestOpenedState = 0;
}
use of net.minecraft.client.gui.screen.ingame.GenericContainerScreen in project KiwiClient by TangyKiwi.
the class EChestMemory method onOpenScreenEvent.
@Subscribe
@AllowConcurrentEvents
private static void onOpenScreenEvent(OpenScreenEvent event) {
if (echestOpenedState == 1 && event.getScreen() instanceof GenericContainerScreen) {
echestOpenedState = 2;
return;
}
if (echestOpenedState == 0)
return;
if (!(Utils.mc.currentScreen instanceof GenericContainerScreen))
return;
GenericContainerScreenHandler container = ((GenericContainerScreen) Utils.mc.currentScreen).getScreenHandler();
if (container == null)
return;
Inventory inv = container.getInventory();
for (int i = 0; i < 27; i++) {
ITEMS.set(i, inv.getStack(i));
}
echestOpenedState = 0;
}
use of net.minecraft.client.gui.screen.ingame.GenericContainerScreen in project meteor-client by MeteorDevelopment.
the class EChestMemory method onOpenScreenEvent.
@EventHandler
private static void onOpenScreenEvent(OpenScreenEvent event) {
if (echestOpenedState == 1 && event.screen instanceof GenericContainerScreen) {
echestOpenedState = 2;
return;
}
if (echestOpenedState == 0)
return;
if (!(mc.currentScreen instanceof GenericContainerScreen))
return;
GenericContainerScreenHandler container = ((GenericContainerScreen) mc.currentScreen).getScreenHandler();
if (container == null)
return;
Inventory inv = container.getInventory();
for (int i = 0; i < 27; i++) {
ITEMS.set(i, inv.getStack(i));
}
echestOpenedState = 0;
}
Aggregations