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.

Luis_ST

Members
  • Joined

  • Last visited

Everything posted by Luis_ST

  1. Why to the server, the effects of the Totem are client side only, you need to send a (custom) Packet from server to client. This can be done as follows: <your simple channel>.send(PacketDistributor.PLAYER.with(() -> <the server player>), <your custom packet>);
  2. Are you sure you know basic java, since the "Menu method" is the constructor. The Component is the title of the Screen you can use Component#empty for testing.
  3. Please post the actual error message you get and please avoid posting images of errors and code, use the Forum code feature or a paste side instead.
  4. You should take a look at this FCW page, especially into this entry.
  5. That should work yes. This will now blit a texture at screen pos 0/2 (x/y) with size 192/192 (w/h) with texture offset 0/0 (x/y).
  6. blit is a method in the Screen class you need to call it after setting up the RenderSystem. If you don't know how to call a method you need to learn basic java before modding minecraft.
  7. Vanilla handles the Totem of Undying in LivingEntity#checkTotemDeathProtection. The particles and the totem overlay are handled via ServerLevel#broadcastEntityEvent with event id 35. Note this will call the vanilla logic of the Totem on the client in ClientPacketListener#handleEntityEvent. I you wish to have a custom behavior you need to send a custom Packet to the client which handle this for you.
  8. You need to blit the texture to the screen via #blit.
  9. You can use https://gist.github.com/ or similar paste websites.
  10. Where did you call it please show more context?
  11. If you using CurseForge you need to enable the debug.log in the settings. I guess this is is a issue with CurseForge
  12. What did you mean by "try to call the screen"?
  13. Please post debug.log from the logs folder. What did you mean by "in Forge", Forge is not a File Explorer?
  14. PlayerTickEvent would be the better option, check there if TickEvent#side is LogicalSide#SERVER. Also note that is fired each tick twice so make sure you check TickEvent#phase against Phase#START or Phase#END.
  15. This error is often an indication that the max fps are set to 0, edit the options.txt file in your game directory and change the maxFps value.
  16. Which version did you use since this is not 1.19.2 code?
  17. I digged a bit into the vanilla code and i found MultiPlayerGameMode#destroyTicks (requires an AT). The only problem is this is client only, if you subscribe to ClientTickEvent in a client only EventHandler class you can access to the MultiPlayerGameMode instance via Minecraft#gameMode. If you use destroyTicks % 20 == 0 you can call the code each second, inside there you send a custom Packet to the server which will damage the Player on server. As I said before, this is unfortunately client only, which means it can easily be modified by other Mods. For this reason it will be difficult to verify this on the server, in this case you might damage the Player even though it doesn't mine a Block.
  18. Player#displayClientMessage Note in your case the second argument must be true
  19. Maybe BlockEvent.BreakEvent it is fired when the player has mined the Block, but has not been removed from the World yet (after the Event). If you create an EventHandler with EventPriority#LOWEST, you can make sure you are one of the last EventHandlers. Then you can get the break speed of the given BlockState and you can calculate the start time.
  20. Unfortunately there a lot of Mods which could cause the crash. The first thing you could try is to remove all magic performance Mods (like Rubidium, etc.) If the error remains please post debug.log from the logs folder. If you using CurseForge you need to enable the debug.log in the settings.
  21. This is still not the debug.log it's debug-1.log, please post a screenshot of your logs folder.
  22. There are a lot of changes in the vanilla and Forge code, if you have code from a older version you can throw it away. What did you already create and where did you need help? And for me, if you're talking about Gui's do you mean a Contains with Slots for Items or only a Screen (client side only) with Buttons etc.?

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.