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.

Draco18s

Members
  • Joined

  • Last visited

Everything posted by Draco18s

  1. *Opens his IDE* *Copy-pastes the code* *Looks at the Javadoc attached to the function* *Finds the answer* Use MinecraftForge#EVENT_BUS instead, they're the same thing.
  2. You need to create the storage in the readFromNBT method, once you know what the capacity and transfer speeds are.
  3. NPEs are easy to solve if you have a stack trace as it tells you exactly what line it occurred on. However, I do not have that information.
  4. No. getRegistryName() does not need the substring(5) bullshit that using getUnlocalizedName() does.
  5. Why you would ever have to pass that through your proxy, I don't know. You already know which side it's on as packets should only go one way: it's sent from the server to the client, the packet handler therefor only exists on the client and it's safe to use Minecraft.getMinecraft() Likewise, going the other way.
  6. Use the constructor that takes 2 floats.
  7. Tile Entities, when reconstructed from the save file on disk, are created using a zero-argument constructor (which yours does not have). This means that it is skipping the storage = new MEnergyStorage(capacity, transferSpeed); line, thus storage is null.
  8. >> No code posted > No help available
  9. You need to synchronize the capability from the server to the client yourself.
  10. I'm not 100% sure. Item stacks can't be null. Use ItemStack.EMPTY
  11. The block only needs to be updated if the TE data effects rendering (my block changes model states based on TE information, such as inventory).
  12. 1) You may want to override getUpdateTag as well. 2) You need to call these whenever the server should send updates to the client.
  13. You don't need that empty string between GRAY and ITALIC. Also, I18n.format() is a thing. I don't know why you're using your own localize function.
  14. If you're doing log-y things, you might be interested in extending BlockLogsBase (IIRC).
  15. Oh no. A custom class. The horror! https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/entities/capabilities/MillableItemsHandler.java
  16. Yep, you're doing it wrong. The TextFormatting enum is a thing. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/flowers/item/ItemOreFlower1.java#L55
  17. Show your code. You're probably doing it wrong.
  18. Doing that would be Bad.
  19. Custom ItemHandler classes.
  20. One of the following is true - The itemstack returned by getPickBlock is incorrect - The item model for the itemstack returned by getPickBlock has not been registered
  21. Unfixable. You shouldn't have to, and it's because you've set its unlocalized name wrong. See how it says "item.item"?
  22. That's because the first one uses the same stack, the second one uses a new stack.
  23. I'm not sure, its not something I've tried to do.

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.