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.

dnzdnz686

Members
  • Joined

  • Last visited

Everything posted by dnzdnz686

  1. Yeah, it was EntityClientPlayerMP, my bad. I know. I mean, I used NBT before, when I was able to. But now NBT is different on Client and Server. For example Im setting nbt string in Item#onUsingTick. Then I want to read it from Minecraft.getMinecraft().player.getEntityData() (because TickEvent.RenderTickEvent doesn't have any entity or player field), and there is no such string. So I decided to use new DataStorage. I've tried to change TickEvent.RenderTickEvent to LivingEntityUseItemEvent.Tick, but error appear on bindTexture, "java.lang.RuntimeException: No OpenGL context found in the current thread.". So Im done at the moment. Exactly. So how am I able to read any data from client? Should I use Custom Packets for such a thing?
  2. How can I get Forge Capabilities from a player using onRenderTick(TickEvent.RenderTickEvent event) { to render kindoff gui, drawString for example. Minecraft.getMinecraft().player is now EntityPlayerSP not EntityPlayerMP, so NBT also doesn't work. Maybe I should sync it somehow? Anyway, Im trying use Capabilities, but on client side also it's empty. Should I use other event? Which one then? I want to render specified drawString/drawTexturedModalRect when player is holding right mouse button on specified item. Previously I was able to do that using NBTs and Item#onUpdateTick, then checking on client onRenderTick if player is holding specified item and draw value from player nbt. That's a short explanation of what I want to do. Thanks for advice!

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.