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.

cookie545445

Members
  • Joined

  • Last visited

Everything posted by cookie545445

  1. I have a tile entity with no GUI and it's completely functional but I want it to render differently if there's a piece of paper in it. I've looked for ages but I can't find a way to synchronise the server instance with the client instance without making my mod 300x bigger and 99.9% improvised. I tried initiating a Packet250CustomPayload but apparently they don't exist anymore. If anyone knows a way to send an itemstack from server to client, it would be greatly appreciated. Thanks in advance!
  2. THANK YOU SO MUCH!!! I think I got it confused with the RenderTickEvent (on the FML bus) and it's not on the Forge Bus Event List so I put it on the FML bus. Also would this count as registering client side only? @SideOnly(Side.CLIENT) @SubscribeEvent public void render(RenderGameOverlayEvent event) { if (event.type == ElementType.TEXT) { mc.fontRenderer.drawString("works", 2, 2, 0xFFFFFFFF, false); } }
  3. I'm probably missing something really obvious here, but I can't get a string to render on the screen. My aim is to get an update-every-tick meter of an NBT integer that only shows when you are wearing a certain helmet, but even just rendering the word "works" doesn't do anything. FML (Tick) Event Handler public class FMLEventHandler { private Minecraft mc = Minecraft.getMinecraft(); private ScaledResolution sclRes; public FMLEventHandler() { sclRes = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); } @SubscribeEvent public void render(RenderGameOverlayEvent event) { mc.fontRenderer.drawString("works", sclRes.getScaledWidth()/2, sclRes.getScaledHeight()/2, 0xffffffff, false); } } I've registered the handler like so: FMLCommonHandler.instance().bus().register(new FMLEventHandler()); Any (working ) help would be greatly appreciated!
  4. I added "this." to it and I've still got the NPE.
  5. I did what you said, but I just got an NPE. EDIT: Ok, I've just found out from the code that it throws that NPE when registerIcon() gets passed null, but I think I've written updateIcons() right. @Override @SideOnly(Side.CLIENT) public void updateIcons(IconRegister iconRegister) { iconIndex = iconRegister.registerIcon("momeat" + ":" + "SeasonedBeef"); }
  6. 2013-03-28 11:20:13 [WARNING] [Minecraft-Client] TextureManager.createTexture called for file textures/items/item_*modid**itemname*, but that file does not exist. Ignoring. That is my error, please help. I have tried the texture in %mcp%/src/minecraft/mods/*modid*/textures/items/item_momeatSeasonedBeef.png %mcp%/src/minecraft/*modid*/textures/items/item_momeatSeasonedBeef.png %mcp%/src/minecraft/textures/items/item_momeatSeasonedBeef.png and it still doesn't work. My code is: package cookie.mods.momeat.items; import cookie.mods.momeat.CommonProxy; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import cookie.mods.momeat.MoMeat; public class ItemSeasonedBeef extends ItemFood { public ItemSeasonedBeef(int par1, int par2, boolean par3) { super(par1, par2, par3); setAlwaysEdible(); } @SideOnly(Side.CLIENT) @Override public void updateIcons(IconRegister iconRegister) { iconIndex = iconRegister.registerIcon("momeat" + ":" + this.getUnlocalizedName()); } } and I just get a square with "missing texture missing texture" written on it.

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.