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.

JdiJack

Members
  • Joined

  • Last visited

  1. How do I make mod B obtain the capability? In the Mod A I just do: IMana mana = player.getCapability(ModCapabilities.MANA, null); if(mana!=null){ int value = mana.getMana(); } The problem is that Mod B does not know the "IMana and ModCapabilities.MANA" classes
  2. So I just need to recreate the same classes on Mod B and it will work?
  3. Hi all, I made two mods that for simplicity we will call Mod A and Mod B. Mod A creates and adds a Capability<IMana> to EntityPlayer and works great. My requirement is to be able to read the capabilities of Mod A from mod B
  4. The player must see for each protected block the rendering of the contour along its sides (see attached picture). Can the payload from server to client be unlimited?
  5. While the payload of packets sent by the server to clients can be great?
  6. I meant "packages", it was a translation error. I need a packet that contains a coordinate list of all the blocks protected by the players. It has worked so far, unfortunately the block list has become too big.
  7. When I try to send my NBTTagCompound with a package to the server, I get the following error: Payload may not be larger than 32767 bytes Can you increase the Payload of the packages?
  8. I've implemented a simple class like this and I can not get it running. I'm desperate are 7 days trying to run WorldSaveData, I'm tired
  9. I do not know. I can not run the code inside them. Even though I call "markDirty ();"
  10. Thank you very much for your help, I appreciate it very much. Conceptually your work is perfect, but my problem is another one. I can not call the "writeToNBT ()" and "readFromNBT ()" methods. I will probably abandon WorldSaveData and implement a system that stores NTBCompaund directly on Disk
  11. I think I'm close to the solution, the problem is that the "readFromNBT" and "writeToNBT" methods are never called, although I call "markDirty ()". Class Code "WorldSavedData": another class code to save a new NTB: code to recover NTB saved:
  12. Thank you, my goal was to understand this. Although I have not yet understood how to pass and assign the result of "getNBTListAree ()" to "writeToNBT (NBTTagCompound nbt)"
  13. As I said before, the areas I want to get must NOT be rectangles, but they can take any shape, so I need to track every block. Please pay attention to this aspect and help me instead of the code I have extended. I have read the documentation https://mcforge.readthedocs.io/en/latest/datastorage/worldsaveddata/ several times. My question is: 1) Is my code correct? 2) how do i save my ntb in worldsavedata class?
  14. I worked a bit and I produced this code: AreeData class (WorldSavedData) methods to write/read NBT I want to save in my WorldSavedData class "AreeData" the result of this method

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.