This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
Quote from ops99 Try CreativeAPI.
public boolean OnTickInGame(Minecraft minecraft) { if(minecraft == null) { minecraft = ModLoader.getMinecraftInstance(); } if(minecraft.currentScreen == null) { isNotGCC = true; } } public boolean OnTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen) { if(!(guiscreen instanceof GuiContainerCreative) && !isNotGCC) { isNotGCC = true; } if((guiscreen instanceof GuiContainerCreative) && !isNotGCC) { Container container = ((GuiContainer)guiscreen).inventorySlots; List list = ((ContainerCreative)container).itemList; list.add(new ItemStack(itemOrBlockNameHere, 1, 0)); // change itemOrBlockNameHere to the block or item VARIABLE NAME, //NOT thier IDs. You can copy that line multiple times for more additions to the list. isNotGCC = false; } return true; } private static boolean isNotGCC = true;
Quote from Groxmapper or if you don't feel like using an API and your using ModLoader, stick this in the mod_ file towards the bottom: public boolean OnTickInGame(Minecraft minecraft) { if(minecraft == null) { minecraft = ModLoader.getMinecraftInstance(); } if(minecraft.currentScreen == null) { isNotGCC = true; } } public boolean OnTickInGUI(float f, Minecraft minecraft, GuiScreen guiscreen) { if(!(guiscreen instanceof GuiContainerCreative) && !isNotGCC) { isNotGCC = true; } if((guiscreen instanceof GuiContainerCreative) && !isNotGCC) { Container container = ((GuiContainer)guiscreen).inventorySlots; List list = ((ContainerCreative)container).itemList; list.add(new ItemStack(itemOrBlockNameHere, 1, 0)); // change itemOrBlockNameHere to the block or item VARIABLE NAME, //NOT thier IDs. You can copy that line multiple times for more additions to the list. isNotGCC = false; } return true; } private static boolean isNotGCC = true;
or if you don't feel like using an API and your using ModLoader, stick this in the mod_ file towards the bottom:
it works for my items not my block's? what do i edit ive been tinkering aroudn wiith code but no luck