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.

MaiTheLord

Members
  • Joined

  • Last visited

  1. vanilla gamerules use GameRules.IntegerValue.create(int value) which is package-private, I'll need to use reflection / AT
  2. gamerules sound better actually. I have no idea how to register one though, and I don't really find anything on google regarding that
  3. As it affects entity spawning, I am not sure the user would want the same value in all of their worlds. should I use a server config then?
  4. I'll try using a config for now. I am not sure if it should be a common or a server config. the value affects entity spawning.
  5. I meant that a datapack whould be able to override it, similarly to how it can override a recipe
  6. I want to store a constant integer in a json file under "resources/data/modid", so that it could be manipulated by datapacks. how do I achieve that?
  7. Thanks. that works. I need to sync it to the client though, as rendering depends on its value, and I have no idea how to implement that. I should note that I am familiar with TCP packets, but never used packets with java or minecraft.
  8. I think I am doing something wrong. https://gist.github.com/MaiTheLord/a19cf50de9735ce3a75fd3999fe82739
  9. I did read it, and a capability seems like an overkill for what I want to do. I might be wrong, but I think the person wanted me to look at this particular piece of code @Override public IntTag serializeNBT() { return backend.serializeNBT(); } @Override public void deserializeNBT(IntTag tag) { backend.deserializeNBT(tag); }
  10. I must be doing something wrong then. CompoundTag tag = entity.serializeNBT(); tag.putBoolean("IsUpgraded", true); entity.deserializeNBT(tag); System.out.println(entity.serializeNBT().getBoolean("IsUpgraded")); // prints false
  11. this exists: CompoundTag tag = new CompoundTag(); tag.putBoolean("upgraded", true); but how do I save it in an entity?
  12. what about a raw NBT tag? I only need to store a boolean, after all
  13. I want to store a true boolean in an entity (something like "isUpgraded:1b" in NBT), but I am not sure whats the correct way to do that in forge. I wanted to use NBT, but I don't know how to read and write it in forge. I saw that there's something called "Capabilities". it seems like it could be a better alternative, but I am not sure how to use it either. What would be the better approach?
  14. I did look at vanilla code, but I don't understand how it works. For example, what does the PoseStack do? How should I use the buffers? And how does it "attach" to the model?

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.