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. Show your code that you tried.
  2. Why do you have this: https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/journey/RegistrationHandler.java#L22 AND this? https://github.com/TheSlayerMC/Journey-1.12/blob/master/main/java/net/journey/JourneyItems.java#L844 In any case, I suspect that your DimensionHelper.init() is being called before your Blocks are created. But as fucking everything is using static initializers, I can't prove it. See also:
  3. You're going to need to supply more code. I recommend posting your project as a git repository.
  4. Because you can't control the order of static initializers. If you created a new class called ModTabs and created CreativeTabs in a static initializer and those constructors reference an item in your ModItems class (what item it uses for an icon), and an item references ModTabs in its constructor (what tab it appears in).... Which one gets created first and has a null value? i.e. do you have a tab with a null icon? or do you have an item with a null creative tab?
  5. But he didn't use a stupid IHasModel interface! ?
  6. The first parameter is a Class. E.g. EntityLivingBase.class
  7. Reflection can do amazing things.
  8. No one is going to download your zip file and explore it. Post your code as a working github repository.
  9. Probably has something to do with this
  10. Good job, you just ignored all of the transform modification tags supplied by item/generated and item/handheld.
  11. Probably not.
  12. Capabilities, generally speaking, is a cross-mod-compatible way of accessing extra data, methods, or interaction for TileEntities, ItemStacks, Entities, etc. without needing to create hard dependencies in your code. For example, prior to 1.10, if you wanted a TE machine that accepted Redstone Flux, IC2 power, and RotaryCraft crank input, you had to implement 3 or more interfaces on your TE, then use Annotations to have Forge remove those interfaces and methods when those mods were not present. With capabilities, everything's done through getCapability in a generic manner.
  13. Capabilities. They really aren't that hard to work with, but do require creating a few classes that don't seem to make a lot of sense. You can see an example I did for TE machines here, but the process will be the same for player capabilities. The only difference is how you attach the capability (for a player, I believe you would use the AttachCapabilityEvent, though I'm not 100% sure on that)
  14. http://mcforge.readthedocs.io/en/latest/events/intro/
  15. This will never be true. == compares object identity. You want equals. I would also refrain from using the name item for this scope variable, as it looks like it refers to an Item (due to the nearby Block newItemBlock = newItem.getBlock();line) but is in fact a BlockPos. I would use pos, loc, location, or point, or similar.
  16. You really should look at the IBlockState interface. IBlockStates are not Blocks. They are a wrapper around Block+Metadata.
  17. Don't use static initializers.
  18. You construct your items here: https://github.com/Merthew/MerthewMod/blob/master/main/java/merthew/mod/init/ItemInit.java#L18 This immediate calls this: https://github.com/Merthew/MerthewMod/blob/master/main/java/merthew/mod/objects/items/ModItem.java#L16 Which references this: https://github.com/Merthew/MerthewMod/blob/master/main/java/merthew/mod/Main.java#L27 Which in turn references this: https://github.com/Merthew/MerthewMod/blob/master/main/java/merthew/mod/init/ItemInit.java#L16 Your tabs haven't finished being created and assigned to your Main mod class's static fields by the time you construct your items, due to the use of static initializers. In order for the JVM to construct your tab it first needs to construct all four items. In order for the JVM to construct all four items, it first needs to get your constructed tabs.
  19. I do not understand this.
  20. Man. If only more people did this.
  21. So? Override getCreativeTabs and return null.

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.