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.

Animefan8888

Forge Modder
  • Joined

  • Last visited

Everything posted by Animefan8888

  1. Sorry I wasn't very clear about this, your Type needs to be your own class or another class not directly a primitive class. Because as you have witnessed you can't just instantiate a Byte or an Integer.
  2. This requires you to create your own capability and register it. To create your own Capability create a public static final Capability<Type> field and annotate it with @CababilityInject @CapabilityInject(value = Type.class) public static final Capability<Type> CAPABILITY; // Where type is a class that stores the information that you want. In your case probably a byte or a int. Then you will have to register it. Via CapabilityManager.INSTANCE.register The parameters are the Type class from above, an instance of IStorage which you will need to create, and a Callable that returns an instance of your Type from above. Then just override initCapabilities in your Items class, and return a new instance of ICapabilitySerializable and handle those methods.
  3. First lets establish some of the parameters of the situation. What are you wanting to store? Will it only be stored on one of your Items?
  4. @JimiIT92 All of your spoilers are empty.
  5. Oh, that's my bad when I read it I inserted an 'I' after the mod link.
  6. You simply just needed to use reflection to change the values of the fields in your preInit method seeing as how botania still uses an old method of instantiating their IForgeRegistry fields and make your mod load after botania, which it should do anyways. Now what would have made it a pain is if vazkii had updated to the new way because then you would have had to use reflection to change the fields and register them yourself. Of course it's more work than simply overriding the registry, but let's be real here why couldn't you have just done a pull request on vazkii's github to allow for the configuration options. It probably would've been easier to create than an addon.
  7. Post your log it should have the error in it. However I think you Json doesn't have the right syntax.
  8. True, but lets be honest the likelihood of this occurring isn't that high. I can't name a mod that actually does this to modded items or blocks. That's not what I was doing, I had switched to explaining what you could do instead of @ObjectHolder
  9. The @ObjectHolder annotation populates a static final field that exists in one of the forge registries. IE if I wanted a local instance of the Emerald Item @ObjectHolder("minecraft:emerald") public static final Item EMERALD = null; That field now stores Items.EMERALD in it. You can use this for your Items, but it is by no means required to use to get rid of static initializers. To get rid of static initializers means to not do public static final Item NAME = new Item().setRegistryName...; // OR public static Item NAME; static { NAME = new Item().setRegistryName...; } So instead you should do public static void registryEvent() { ModItems.NAME = new Item().setRegistryName... // Register. }
  10. ItemStacks cannot and should not ever be null. Use ItemStack.EMPTY.
  11. I believe there is a class called ForgeChunkLoader or ForgeChunkManager? That allows you to do something with them. I'm not really sure.
  12. If it is not being manually kept loaded, ie spawn chunks or chunk loader. Then once they are a distance away from the player they unload, in singleplayer it is the render distance (I believe) in multiplayer it's a "render distance" that is specified in the server.properties file.
  13. Learn Java before making a mod. Try a different tutorial possibly in vain. Or better yet, learn Java.
  14. Sorry, 1.7.10 is no longer supported on here due to it's age. It's more than 4 years old. Please update to the latest version to receive assistance.
  15. Its a class you have to make. It can be named anything you want, but it needs to have the @Mod annotation.
  16. Any Java tutorial really. Stanford has a really good YouTube playlist of their Java course. That code looks good.
  17. He meant a StackOverFlow Exception. You shouldn't be calling a method inside of itself unless you know what you are doing. You need to call your register method from your @Mod class.
  18. What is in here?
  19. Post the log for the server. Uh, no. Where did you hear that?
  20. I assume you mean for 1.13, in which case. "The update for 1.13 is being worked on, but there is no release date for it yet. Updates to a new version of Minecraft take a lot of work, so please be patient. Please refrain from making "is it done yet?" threads. The update will be ready when it is ready." If not post what you did after you downloaded the mdk.
  21. Dont post your code as a download, use the built in code format(<>), or an online code site(github, bit bucket, etc.). There is a method in the Container class called addSlot use that.
  22. What did you get from the debug session.
  23. Well, don't follow it. You don't always find the correct answer on YouTube. Instead do what V0idWa1k3r said.

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.