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.

q8minecraft

Members
  • Joined

  • Last visited

Everything posted by q8minecraft

  1. Hello.. I'm trying to code this mod which tells you if you're inventory is full, and if it is, it render the stats (GUI) into the screen, For example I have a simple GUI on the left corner of my screen that says Inventory stats: Full <-- that's if its full, If its not full and can still contain items it says Inventory stats: Empty So here's my code.. Main class package me.q8minecraft.fullinv; import com.q8minecraft.event.ScreenRender; import net.minecraftforge.common.MinecraftForge; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; @Mod(modid = FullInv.MODID, version = FullInv.VERSION, name = FullInv.NAME) public class FullInv { public final static String MODID = "FullInv"; public final static String NAME = "FullInv"; public final static String VERSION = "1.0.0"; @EventHandler public void init(FMLInitializationEvent e) { MinecraftForge.EVENT_BUS.register(new ScreenRender()); } } ScreenRender class: package com.q8minecraft.event; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.client.Minecraft; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType; public class ScreenRender { @SubscribeEvent public void renderOverlay(RenderGameOverlayEvent e) { if(e.type == ElementType.JUMPBAR || e.type == ElementType.EXPERIENCE) { Minecraft.getMinecraft().fontRenderer.drawString("Inventory Stats: ", 2, 2, 0xFFFFFF); } } }

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.