Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/24/18 in all areas

  1. Don't ever use static initializers for registry entries. Instantinate your stuff in the appropriate registry event. BasicItem is an antipatteri. There is already a BasicItem, it's called Item. IHasModel is stupid. All items need models, no exceptions, and nothing about model registration requires access to private/protected data. Register your models directly in the ModelRegistryEvent. This makes no sense for two reasons. Reason number one is that Info.proxyCommon points towards an interface which can't be instantinated in the first place, which will crash the server. Reason number two is that your common proxy can't be your server proxy, since a server proxy either provides noop implementations for client-only methods or references classes/methods/fields that would crash the client. Uh, are you really calling static methods in your interfaces here? First of all this loads the IProxyC class, which will crash the server. Second of all why are you even doing this? Are you aware of how static methods work and the fact that they can't really be overridden? Do you know basic java? Speaking about your proxies, this is me nitpicking but why are they called IProxy[C/S]? the I prefix in java usually indicates that it is an interface which is not the case. Don't have your proxy be an event bus subscriber. Have a dedicated class for that stuff. https://github.com/nov4e/NovaMineResources/blob/master/main/java/com/nov4e/novamine/Registry.java#L100 Don't do this. Remove registry entries in the appropriate registry events. In general if you are accessing a registry like that chances are you are doing something wrong. https://github.com/nov4e/NovaMineResources/blob/master/main/java/com/nov4e/novamine/Registry.java#L107 Don't do this. The recipe output may vary, or even be empty. Remove recipes based on their registry names, those are consistent. This actually ties in directly into this issue: In this case https://github.com/nov4e/NovaMineResources/blob/master/main/java/com/nov4e/novamine/features/tooltips/VanillaTooltips.java#L14 Don't do this. You might be only playing in english but there are plenty of people who might want to play with your mod but don't know english or simply want to read the text in their native language. Don't ever add straight-up english text if you can avoid it, use the localization feature of the game.
    2 points
  2. Look at DynamicTexture, that is minecraft's way of having textures outside of assets. For an example of usage see GuiListWorldSelectionEntry#loadServerIcon
    1 point
  3. There isn't an event specific to player finishing eating the food but you can listen to LivingEntityUseItemEvent.Finish. That won't work for mods that add food that can be eaten instantly by simply right-clicking it, though I know of none such mods.
    1 point
  4. Thank you! I was able to fix the problem by uninstalling my 32 bit Java, forcing it to use the 64 bit version. I don't know why it was using the 32 bit version to begin with!
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.