Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/26/19 in all areas

  1. The block, not the item, but yes, either through object holders or through a field. Not a field that statically initializes said block though!
    1 point
  2. It would be easiest to do with a one-line stream Pseudo-code: ForgeRegistries.ITEMS.valueCollection().stream().filter(i -> i.getRegistryName().getDomain().equals(MYMODID)).foreach(i -> ModelRegistry.setCustomModelResourceLocation(...))
    1 point
  3. https://mcforge.readthedocs.io/en/latest/concepts/registries/#injecting-registry-values-into-fields
    1 point
  4. If you couldn't cast something to something else then you would crash with a ClassCastException. I think you need to send a packet to the client notifying them that they can fly now. Actually, scratch that, your code will never work if(w.isRemote) { PlayerFlight.setFlight(p, true, sender.getEntityWorld()); } Commands are executed on the server so this condition will always be false thus your flying code will never execute. Also IHasModel is stupid. All items need models, no exceptions, and IHasModel makes you write redundand code a lot(as in you need 3 lines PER ITEM as a bare minimum instead of ONE line and that's it). Register your models directly in the ModelRegistryEvent.
    1 point
×
×
  • Create New...

Important Information

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