Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

kev30

Members
  • Joined

  • Last visited

  1. I don't have a GuiHandler. Also To what should i change the modloader thingy then? To what do i need to add what ? I just started a few days ago with coding i don't know everything yet.
  2. So i'm trying to create a chest but i'm keep getting this error. A mod tried to open a gui on the server without being a NetworkMod Main file public void load(FMLInitializationEvent event) { ModLoader.registerContainerID(this, 30); Block crest = new crest(1999, Material.wood).setUnlocalizedName("Crest"); GameRegistry.registerBlock(crest, "crest"); LanguageRegistry.addName(crest, "Chest"); GameRegistry.addRecipe(new ItemStack(crest, 1), new Object [] { "012", "345", "678", Character.valueOf('0'), new ItemStack(Block.stone, 1), Character.valueOf('1'), new ItemStack(Block.stone, 1), Character.valueOf('2'), new ItemStack(Block.stone, 1), Character.valueOf('3'), new ItemStack(Block.stone, 1), Character.valueOf('4'), new ItemStack(Block.stone, 1), Character.valueOf('5'), new ItemStack(Block.stone, 1), Character.valueOf('6'), new ItemStack(Block.stone, 1), Character.valueOf('7'), new ItemStack(Block.stone, 1), Character.valueOf('8'), new ItemStack(Block.stone, 1) }); } GUI @SideOnly(Side.CLIENT) public class Guicrest extends GuiContainer{ public Guicrest(InventoryPlayer inventory, int x, int y, int z) { super(new ContainerCrest()); } protected void drawContainerForegroundLayer(int par1, int par2) { this.fontRenderer.drawString("Crest", 0, 0, 4210752); this.fontRenderer.drawString("Inventory", 0, 0, 4210752); } //declare your variables private static final ResourceLocation field_110410_t = new ResourceLocation("compitem:textures/gui/container/generic_54.png"); protected void drawGuiContainerBackgroundLayer(float f, int i, int j) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.renderEngine.func_110577_a(field_110410_t); this.xSize = 212; this.ySize = 222; } } block file @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister){ this.blockIcon = par1IconRegister.registerIcon("stone.texturePath"); } @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float a, float b, float c) { if(!world.isRemote){ FMLNetworkHandler.openGui(player, new ContainerCrest(), 30, world, x, y, z); }else{ ModLoader.openGUI((EntityPlayerSP) player, new Guicrest(player.inventory, x, y, z)); } return true; } public TileEntity createNewTileEntity(World par1World) { return new TileEntitycrest(); } I'm a beginner in coding and trying to learn how to create a mod. I have been coding now for a few days and this is just a error that i could not fix.
  3. kev30 replied to kev30's topic in Modder Support
    Well i looked it up in the tutorial i was following but now i cant find it in the video but i'm creating a chest and just following the tutorial
  4. So I'm new to modding and following some tutorials. Currently I'm creating a chest but I'm stuck on a error public void load(){ ModLoader.registerContainerID(this, 30); GameRegistry.registerTileEntity(TileEntitycrest.class, "TileEntitycrest"); GameRegistry.TileEntity(crest, "crest"); } That is the part of the code I'm using. The problem is that he gives a error at "TileEntity" I hope somebody knows what I'm doing wrong. ~Kev

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.