Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/03/20 in all areas

  1. Thanks so much!! That makes sense I only called ModItems.init(); in my main class and not ModBlocks.init()! I definitely won't make the same mistake. So all these replies are just a simple error on my part. Sorry for the spam, but I hope it helps someone else learn. Thanks for everyone's help!
    1 point
  2. Doesn't seem to be anything wrong to me... Where are you calling those init functions for these classes?
    1 point
  3. The block being used by your BlockItem is returning null in its registry object, and therefore "not present", when it goes to register the item. Please show your block registration code.
    1 point
  4. For anyone searching for this, I managed to get it working in 1.15.2 with this code: public static final ResourceLocation INTERACT_WITH_SHIP_CONTROLLER = registerCustomStat("interact_with_ship_controller"); private static ResourceLocation registerCustomStat(String name) { ResourceLocation resourcelocation = new ResourceLocation(MOD_ID, name); Registry.register(Registry.CUSTOM_STAT, name, resourcelocation); Stats.CUSTOM.get(resourcelocation, IStatFormatter.DEFAULT); return resourcelocation; } You can then increase the stat: player.addStat(Registry.INTERACT_WITH_SHIP_CONTROLLER); Don't forget to localize it so it has a name in the stat list: "stat.sol.interact_with_ship_controller": "Interactions with Ship Controller" For fun, you can track your new stat with these commands: /scoreboard objectives add stat minecraft.custom:minecraft.interact_with_ship_controller /scoreboard objectives setdisplay sidebar stat
    1 point
  5. I'm not sure what you are asking. Is the file located in the built jar file? And could you post your code as a github repo so I can test it locally?
    1 point
  6. You are passing in an ItemGroup instead of Item.Properties in the second parameter.
    1 point
  7. Hi This working example (tutorial) project will show you how you can register TileEntities - see mbe20, mbe21 https://github.com/TheGreyGhost/MinecraftByExample -TGG
    1 point
×
×
  • Create New...

Important Information

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