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. i would recommend you to use DataGenerator to create the json files automatically, the Forge example also use data generation, take a look at this
  2. did you create a config (*.toml) for your mod? -> if yes show the classes where you create the config did you modify any config file from Forge/other Mods? -> if yes, use \n to create new lines in String values and check if the String values starts and ends with " did you use any dependencies? this is your error:
  3. you can get the Entity (with cast the Player) via LootContext#getParamOrNull and LootContextParams.THIS_ENTITY
  4. no, you need a custom Packet if you want to send data from server to client this is a terrible idea, do not send data each tick, send the data only if it changed
  5. there are two ways: you use a custom Network Packet and sync the data via a SimpleChannel (doc). whenever the data changes override BlockEntity#getUpdateTag and retrun a CompoundTag with the data to sync, override BlockEntity#handleUpdateTag to handle the data sync on client. whenever the data changes you need to call BlockEntity#setChanged choose the way you prefer
  6. the message class needs only three static methods: encode with parameters: a message and a FriendlyByteBuf decode with parameters: FriendlyByteBuf, and returns an instance of your message handle with parameters: a message and a Supplier with NetworkEvent.Context when registering your message to a SimpleChannel you must provide these three methods (via a BiConsumer for encode, a Function for decode and a BiConsumer for handle) you can take a look at this doc for about how to register messages
  7. in Item#inventoryTick you have a Level parameter, use a instanceof to check if it's a ServerLevel then you can cast the Level to a ServerLevel
  8. please post the following file: .minecraft/logs/debug.log and use https://gist.github.com/ to upload it
  9. delete this server config file
  10. did you register the ItemProperties for a Bow in FMLClientSetupEvent
  11. your are on client so there is no Server
  12. you need to set the RenderType of your Block to RenderType.cutout via ItemBlockRenderTypes.setRenderLayer in FMLClientSetupEvent
  13. make sure the Optifine version is compatible with your Forge version, if they match post debug log
  14. use your IDE to find the correct import
  15. subscribe PlayerEvent.TabListNameFormat and do there whatever you want
  16. you can look at the PipeBlock it's basically a CableBlock
  17. update Forge to the latest version, also 1.16.5 requires java 8
  18. click into the console window, press CTRL + C go back to the Forum and press CTRL + V
  19. Player#getCapability you need a custom Network Packet (Message) and a SimpleChannel, you can read the doc
  20. it's a Mod, i think the full name is Applied Energistics
  21. you need to use ServerLevel#getDataStorage then check the check if it's an instance of ServerLevelData, then use ServerLevelData#setGameTime

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.