Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.List;
- ModLoader.SetInGUIHook(this, true, false);
- boolean addedToGui;
- public boolean OnTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen)
- {
- if ((guiscreen instanceof GuiContainerCreative))
- {
- if (!addedToGui)
- {
- Container container = ((GuiContainer)guiscreen).inventorySlots;
- List list = ((ContainerCreative)container).itemList;
- list.add(new ItemStack(guiBlock, 1));
- addedToGui = true;
- }
- }
- else
- {
- addedToGui = false;
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement