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. We would also need the createItem method and the ModItemBed class, possibly also the darkOakBed definition.
  2. My mistake. I took a guess from the information I had available.
  3. This is not a modding question, this is a Java question.
  4. LootTableLoadEvent. Uses my LootUtils class.
  5. Then you should do that. Calling random again generates a new random number.
  6. The method signature likely changed. Check the super class for the new signature.
  7. This method: https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.10.2/src/main/java/gunn/modcurrency/mod/container/itemhandler/ItemHandlerVendor.java#L26 is marked non-null. The stack parameter is marked non-null, but yet you check to see if it's null anyway (and if it is, you return it).
  8. Yes, you do. isReplacable() isn't checked during world.setBlockState(), it's checked by ItemBlock's onUse action.
  9. That's because you don't need getChunkFromBlockCoords at all. All you need to do is take the spawn coordinates (in block form) and do >>4 on them to get the chunk coordinates. You don't need the chunk, all you want to know is if the current chunk has the same coordinates as the spawn chunk.
  10. Of course not. world.getChunkFromBlockCoords(new BlockPos(spawnX >> 4, world.getSpawnPoint().getY(), spawnZ >> 4)); You said "get me a chunk from block coords" and then passed in chunk coords. Also, the Y value is irrelevant, you should just pass 0 there rather than spending CPU cycles calculating how high up the spawn is, just to pass it into a method that gives no fucks.
  11. getFlamability not setFlamability
  12. I have a feeling that what you actually want is to roll the random once and compare its value in each of the five statements.
  13. Probably not because no one else uses Krolin...sorry, Kotlin to program mods. The fact that onBlockAdded is never called is a complete mystery to us.
  14. Only if you naively try to convert from item meta to block meta. But yes.
  15. Or somewhere, at least.
  16. Don't use Access Transformers, use Reflection instead. ReflectionHelper will do a lot of the gruntwork for you, you just have to make sure to supply both the MCP name (the one you can see) and the SRG name (which can be done by looking it up via MCPbot).
  17. Blocks and ItemBlocks aren't the same thing, still. Blocks in the world can only contain metadata (0-15) and nothing else. If you want additional data, you need a TileEntity (NBT does not apply to blocks).
  18. Uh. The 0-15 limit is for blocks. Item stacks have a limit of 0-32,000 (and a bit).
  19. Classic XY Problem. You had a problem X and you thought you could maybe solve it by doing Y, but you encountered another problem you couldn't solve, so you asked how to solve Y when what you really needed was to solve X.
  20. Are you trying to display the damage indicator bar? (To answer the question asked: no, because NBTdata is data, not code: you would have to either set the metadata when you change the NBTdata or ask the right question, because this sounds like an XY Problem).
  21. This is a forum, not a chat room, I'm not hitting F5 every 15 seconds. You need to post your entire json file, I can't tell what the problem is from that.
  22. Package is irrelevant and only for your own convenience.

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.