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.

ThunderSmotch

Members
  • Joined

  • Last visited

Everything posted by ThunderSmotch

  1. Not needed as I fixed it . Damn that was hard to debug .
  2. Now the GUI opens but whener I try to pick an item from the inventory I get an Internal Server Error
  3. package techCraft.common; import java.util.Random; import net.minecraft.client.Minecraft; import net.minecraft.src.*; import net.minecraftforge.client.MinecraftForgeClient; import techCraft.client.*; public class mod_BlockDualWorkbench extends Block { public mod_BlockDualWorkbench(int id) { super(id, Material.iron); this.setCreativeTab(CreativeTabs.tabBlock); setHardness(2.5F); setBlockName("dualworkbench"); } int Top = ModLoader.addOverride("/terrain.png", "/techCraft/workbenchTop.png"); int Side1 = ModLoader.addOverride("/terrain.png", "/techCraft/workbenchSide1.png"); int Side2 = ModLoader.addOverride("/terrain.png", "/techCraft/workbenchSide2.png"); public int idDropped(int metadata, Random random) { return blockID; } protected int damageDropped(int metadata) { return metadata; } // If you use metadata to change the texture of the block. public int getBlockTextureFromSideAndMetadata(int side, int metadata) { switch (metadata){ case 0: { if(side == 1) return Top; if(side == 0) return Block.blockSteel.getBlockTextureFromSide(0); if(side == 2) return Side1; if(side == 3) return Side1; if(side == 4) return Side2; if(side == 5) return Side2; break; } } return Top; } public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) { if(par1World.isRemote) { return true; } else { Minecraft.getMinecraft().displayGuiScreen(new mod_GuiCrafting(par5EntityPlayer.inventory, par1World, par2, par3, par4)); //par5EntityPlayer.openGui(mod_TechCraft.instance, 1, par1World, par2, par3, par4 ); return true; } } } package techCraft.client; import net.minecraft.src.*; import org.lwjgl.opengl.GL11; import techCraft.common.mod_ContainerWorkbench; public class mod_GuiCrafting extends GuiContainer { public mod_GuiCrafting(InventoryPlayer par1InventoryPlayer, World par2World, int par3, int par4, int par5) { super(new mod_ContainerWorkbench(par1InventoryPlayer, par2World, par3, par4, par5)); this.ySize = 219; } /** * Called when the screen is unloaded. Used to disable keyboard repeat events */ public void onGuiClosed() { super.onGuiClosed(); } /** * Draw the foreground layer for the GuiContainer (everythin in front of the items) */ protected void drawGuiContainerForegroundLayer() { this.fontRenderer.drawString(StatCollector.translateToLocal("container.crafting"), 28, 6, 4210752); this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752); } /** * Draw the background layer for the GuiContainer (everything behind the items) */ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { int var4 = this.mc.renderEngine.getTexture("/gui/dual.png"); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.renderEngine.bindTexture(var4); int var5 = (this.width - this.xSize) / 2; int var6 = (this.height - this.ySize) / 2; this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize); } public static Object buildGUI(InventoryPlayer inventory, World world, int x, int y, int z) { return new mod_GuiCrafting(inventory, world, x, y, z); } } These are the codes ;s
  4. I'm trying to create a new Crafting Table, I have every class needed etc, but whenever I try to open the GUI I get an "Internal Server Error"

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.