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.

Coder

Members
  • Joined

  • Last visited

Everything posted by Coder

  1. I would like to get the item that has joined, get its name, take that name check if it is included inside an array if so, tell me that this item is there and it has the said custom name. I want to highlight items that spawn when you have many items on the ground it is very helpful. That's all.
  2. I would like to target items with a specific custom name for highlighting etc
  3. Aha! But for some reason it returns "Air" instead on the item name
  4. I would like to get the name of every item that "joins" the world. Meaning the entity item that's on the ground.
  5. Sorry for me acting like a complete noob. How do I get this using entityjoinworldevent?
  6. I think you need reflection for this
  7. Just get the custom name of the item.
  8. Hello, I am using reflection to get an item's display name by replacing its data manager. the only thing I am changing there is setEntryValues in which I find the itemStack and like this, I get the item display name. Sometimes when an item spawns it will disappear client side but when I will walk to the item location I will pick it up. Is it possible that forge is removing the visibility of the item for some reason?
  9. Is it possible to get a list of all the items inside a chest without opening it? (Client side)
  10. I am getting text using .getName().getUnformattedComponentText() however, the server adds § to format the colors, I can't really remove it if I don't have access to how the server displays it. Can I compare these two "getUnformattedComponentText" that have some formatting in them?
  11. I am trying to find out if a formatted string is equal to something. When I open the game inside eclipse it works, but when I compile it, it doesn't recognize the § symbol. (my idea is it replaces it with �). Can I do something about this? I really need the text with the formatting codes, it is stored inside a string variable.
  12. oh right, reflections are no fun
  13. I did, but I couldn't manage to access upperChestInventory
  14. I checked GuiChest by itself and what e.getGui() gives, also e.getGui().getClass() , couldn't find it. I'm probably not even close
  15. Awesome it worked. I am fiddling around trying to figure out how to get the custom chest name. Should it be inside getGui()?
  16. I don't think I really know how to do this, do you have an example of this? GL11.glColor4f(1, 1, 1, 1); This is what I found but it does nothing. Also, can I get the chest's custom name from this event?
  17. ScaledResolution sr = new ScaledResolution(mc); String displayGUIText = "This is a place-holder"; e.getGui().drawString(mc.fontRenderer, displayGUIText, sr.getScaledWidth() / 2 - mc.fontRenderer.getStringWidth(displayGUIText) / 2, sr.getScaledHeight() / 2 - 85, 0xFFFFFF); just some basic font render stuff, it's all inside the event listener I sent earlier. (DrawScreenEvent.Post)
  18. http://prntscr.com/jjyday This should be white, 0xFFFFFF or §f. All colors appear darker than they should for some reason.
  19. Btw. why does text look dark there?
  20. Oh oops, how did that get there
  21. @EventHandler public void renderChest(DrawScreenEvent e) { if (e.getGui() instanceof GuiChest) { System.out.println("ok"); } } Doesn't work for some reason
  22. I need to add text to the chest window when the name of the chest is equal to something. I guess I need an event that fires every tick or so when you are inside a chest, and then render the text somehow above it. Are there any good examples of the events I need to use in order to achieve something like this?
  23. Hi, hello. I need to send a chat message client side only. I do it like so sender.sendMessage(new TextComponentString... I would love to know if there is a way of editing the message after it is already sent. Is this possible without rewriting the whole messages GUI class?

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.