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. Yep. I don't need it in my own mods. https://gist.github.com/Draco18s/40ba5cb4f69d5dbc790d04bac09dffe2#file-mc-log-L196 https://gist.github.com/Draco18s/40ba5cb4f69d5dbc790d04bac09dffe2#file-mc-log-L260 https://gist.github.com/Draco18s/40ba5cb4f69d5dbc790d04bac09dffe2#file-mc-log-L324
  2. Correct link: https://github.com/cryxlichlord/RubyMod What you posted works, but it is a link to the commit itself, rather than to the root directory. Looking at the log... Several missing model files and one error about... Not sure what's causing that. Also, see everything I said over here.
  3. Post the URL of your project.
  4. Show your code. Like, any of it. Preferably all of it as a GitHub repository. We're not psychic. Also, your thread title makes no sense. This is the actual error you are getting: java.lang.RuntimeException: One of more entry values did not copy to the correct id. Check log for details! Also, post the full log so we can "check the log for details." There's also no references to the TextureMap what so ever in that crash report.
  5. Show more of your code. If that is in your Item class, you are doing everything wrong.
  6. You need to call ModelLoader.setCustomModelResourceLocation on all items from within the ModelRegistryEvent (which should be in your client proxy, as models are client side only). You also do not appear to be creating and registering any blocks or items yet. You have these declarations and this Item class, but they appear unused. You need to register blocks during the Registry.Register<Blocks> event and items (including blocks that have items) in the Registry.Register<Item> event.
  7. You do not need this. Just use a lang file. (My assets are apparently still using an older format, the current format uses all lower case, so "en_us.lang" not "en_US.lang") Problematic Code #10
  8. registerItems needs to be static if you want to use the @Mod.EventBusSubscriber annotation.
  9. Do not use ForgeRegistries.ITEMS.register(rbsteak); directly. Use the registry events. The problem is that you likely did not register the class with the event bus correctly / at all.
  10. You mean the GUI? You need to replace it and use your own GUI instead.
  11. You're not actually registering any items or blocks: http://mcforge.readthedocs.io/en/latest/concepts/registries/#registering-things You will want to follow the same nomenclature for registering item models as well, using the ModelRegistryEvent inside your client proxy. e.g. like this (albeit my code takes in the data in a different way, storing it in an custom typed array, but still calling ModelLoader.setCustomModelResourceLocation from this method).
  12. Also: @Override public boolean hasCapability(@Nonnull Capability<?> capability, @Nullable EnumFacing facing) { return capability == CapabilityHandler.INV; } What if another mod adds a separate capability to all TileEntities? Yours will always return false for it.
  13. This should be in your client proxy. Client proxy is already side-only client. You avoid the @SideOnly annotation that way. IHasModel makes no fucking sense. ALL ITEMS NEED MODELS.
  14. Nothing wrong with that either. I just see that interface literally everywhere and it's pointless. As a guide, 90% of the tutorials written for modding are written by new modders who haven't figured everything out yet, but they figured out this bit in a way that doesn't explode and so they write a tutorial. Me? I liked the cleanliness of how 1.7's GameRegistry worked (from the perspective of using the class), in that it took 2 to 3 lines to register items and blocks, everything else "happened by magic." I.e. out of my sight and Just Worked. So I went about recreating that in 1.10 (and have since updated for 1.12). https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/EasyRegistry.java https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/hardlib/client/ClientEasyRegistry.java Acts as common/client proxy in a library mod (note 1). It's a little hard to follow just because there are several wrapper methods that just call another method. Could be refactored, but I was working outwards at the time. 1.12 also messed with things with the registry events, so all those methods end up just shoving data into an object and stuffing that into an array, which later gets referenced by the events. And usage: https://github.com/Draco18s/ReasonableRealism/blob/1.12.1/src/main/java/com/draco18s/farming/FarmingBase.java#L102-L128 Clean, simple, has all the options. Note 1 A common proxy does not make sense 99.99% of the time. Even this could be refactored, but in this context, it makes sense to leave it.
  15. Not related to your issue, but this is dumb: https://github.com/Merthew/MerthewMod/blob/master/main/java/merthew/mod/util/handlers/RegistryHandler.java#L31-L41 The whole notion of IHasModel is fucking stupid. ALL ITEMS NEED MODELS. Secondly, you don't need to ask the item what it's model is, just call ModelLoader.setCustomModelResourceLocation(item, meta, resource_location) directly. There's no reason to ask the item itself to generate that information, as its all public and accessible from outside classes. There is nothing about this that requires that it be inside the item. This pattern infuriates me as it was created by someone who didn't know what they were doing and has tossed it up as a "tutorial." Then this: https://github.com/Merthew/MerthewMod/blob/master/main/java/merthew/mod/objects/blocks/ModBlock.java#L23 Completely bypasses the whole notion that blocks do not necessarily have item forms (does the extended piston have an item? No it does not. Does cake? Not it does not). There's nothing wrong with giving your blocks items automatically, but by making your base block class's constructor do it, none of your block subclasses can prevent it.
  16. Automatically, as long as you set up the annotations correctly.
  17. EnumType is a terrible name for your variants. This method is broken. You use the same bits for axis and variant. This is also broken. You have 4 variants and you're trying to read them from a single bit. Not sure what this is, but it's probably broken, you have 4 variants. Ditto for your leaves. Again with the &1. Again with using the same bits. Your fromMeta is broken, it doesn't read the DECAYABLE value.
  18. You don't. Its an event. It's called by Forge.
  19. http://mcforge.readthedocs.io/en/latest/events/intro/#creating-an-event-handler
  20. http://mcforge.readthedocs.io/en/latest/events/intro/#creating-an-event-handler Do you want the item added to the player's inventory to be enchanted? Yes? Then freaking hell yes you do it there
  21. In the EntityJoinWorldEvent event handler?
  22. And what good would that do? You need to give the item to the player when they join the world. That's an event.
  23. ItemStack someStack = new ItemStack(...); someStack.addEnchantment(...);
  24. # is a Javadoc notation that means "this is not a static method, you cannot invoke ItemStack.addEnchantment directly, you need an instance of an item stack and then you can call addEnchantment on it."
  25. Make the client-side TE also move the xp orbs.

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.