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. There's a reason our FAQ is actually an EAQ
  2. What on earth is going on here.
  3. withVariant() and getBlock() are counter to each other. withVariant() defines which variant (and thus metadata) to use. getBlock() strips metadata information. If you want to register a variant block as a recipe, you need to get the item stack of that variant. Presumably you have a getDrops() or getPickBlock() method overridden in your block class that will do that. Also, this button is for inline code:
  4. You replace GameRegistry.registerRecipe(...) with a call to Foo.registerRecipe(...) where Foo is whatever you named the class with that code in it. Then, when you run the game, it will generate a bunch of json files in the config/recipes folder. You then copy these files to your assets and disable the Foo.registerRecipe(...) calls.
  5. You haven't simulated anything. You created a new ender pearl entity and then....did nothing with it. You didn't even set its position (so the default values of 0,0,0 apply) and then ask the game "can this location see the sky?" No, no it cannot.
  6. Remove the "display" attributes and change the parent to "item/generated" instead of "builtin/generated" item/generated sets up all of the display tags you'd ever want (for tools/weapons, use item/handheld).
  7. Just be aware that every time you run your mod and the recipe stuff is enabled, it will generate a bunch of files. It makes no attempt to delete any and will just use new names for the same recipes/advancements.
  8. See also my reply post at the bottom which also supplies some code to generate the advancements (although the trigger conditions still need to be adjusted manually).
  9. RegistryEvent.Register<IRecipe>
  10. Not sure, I've not encountered this problem before.
  11. As long as the "modid" part of the path matches your mod ID (remember that everything is enforced lower case!) you should be fine.
  12. The recipe book is handled by an advancement, which is a separate JSON file. Additionally if you have the gamerule enabled that any unlearned recipes are uncraftable, that could also be blocking you from crafting your new recipe until you have that advancement.
  13. You already had an mc variable, you don't need to do Minecraft.getMinecraft() again.
  14. You bound a texture. When you're done, you need to rebind the texture vanilla was using.
  15. The client and server are picking different random values. The client's value updates the GUI immediately (because it's already right there) but the server has to send a packet informing the client of the current (and correct) stack size.
  16. Well...you'd need a custom sword class, you can't do this with just the tool material enum.
  17. No, you need to specify all variants.
  18. Oh god no. That would take billions of bytes of RAM to store even the smallest of worlds. No no, Block classes are a model, this is why all of the methods are passed a World and BlockPos value. Also, by making that field static, you forced it to be the same value for all instances of your class anyway, so even if you were right, you still singleton-ized the value. If you need per-position storage, you must use a TileEntity.
  19. Show your code. mcmod.info files are useless, they are barely even used by Forge.
  20. You're probably missing: public boolean isFullCube(IBlockState state) { return false; }

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.