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. You should be using the Registry events to register your blocks and items, not this. @SubscribeEvent public void registerItems(RegistryEvent.Register<Item> event) { event.getRegistry().registerAll( //items here ); }
  2. Some images would help understand the problem.
  3. No worries, you're doing pretty good so far. Got it working?
  4. That's where it is. I didn't have my dev up and couldn't go looking for it easily. I just knew it was "around somewhere."
  5. Its called a Container Item. In your item class you'll want to override the (two?) methods regarding container items and in one it'll be a boolean (return true) and other will be an item stack (return a new one of a bucket).
  6. You shouldn't have to do anything. I thought the whole container item business was already set up by vanilla code.
  7. That's a block. You need an Item to call that method. https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/ores/item/ItemOreBlock.java#L12
  8. Have called hasSubtypes(true) in your item class constructor?
  9. You can't. Don't make blocks larger than 1x1x1, Minecraft does not treat them as you would expect (mobs will path through them, you can place other blocks in those spaces, the outline doesn't work).
  10. Create the registry event. Create your items/blocks/biomes/whatever in it. Register them.
  11. That's because LivingEntity is a type name, not an object instance.
  12. No. That doesn't exist. The number can't even be calculated with any level of meaningfulness.
  13. Or you could find an empty slot and return doing nothing. If you get to the end of the loop, print your message, because you failed to find an empty slot and return early. And that's assuming that you care about stack size > 0 counting as "full" even if that slot only contains a single cobblestone. At which point you need to check current stack size against the maximum allowed. The short of it is that your coding abilities are abysmal and we're not going to walk you through fixing every little thing. Instead, we're going to point and laugh. I'm not even sure your code is as functional as this car is:
  14. This code won't work. That is, even assuming that it compiled and ran and all those other problems you have...this code would not do what you want it to do. Why? Easy. "Lets look at the player's inventory. First I look at the stack in slot 0. Oh hey, 16 planks. 16 planks is not empty. Not-not-empty is true. True means I tell the player their inventory is full and stop looking! Hooray I'm done!"
  15. Well, a shaped recipe is not a furnace recipe, sooo.... Also, by making the spaces around the center bit like that you're forcing the item to sit in the center of the crafting grid, rather than it able to go anywhere. This is generally frowned upon as it breaks the conventions for how crafting works.
  16. As it turns out all I had to do was clean the project and it was fine. Something was getting cached badly and not being refreshed.
  17. As far as I know there are not currently any event hooks for chunk gen. This is likely due to the multi-threaded nature of worldgen now.
  18. Just started toying around with this myself. And not encountering the same issue. Post your loot table.
  19. And I've messed with it before.
  20. No. There are methods on the TextComponent class that allow you to add formatting. Don't bake it into lang file.
  21. This only means that you haven't realized that the dumpster is on fire yet. Not that the dumpster isn't a dumpster or not on fire.
  22. You need a useContext to call this, yes. There is no alternative.
  23. I have this loot table: It is a direct copy of the Wheat block loot table except that I've replaced the seed and crop references with my own item and block. Nothing drops when the block is destroyed and no errors are left in the log (if I mistype the seed item I do get an "expected item, got string" error).

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.