Skip to content

Instantly share code, notes, and snippets.

@falseresync
Last active June 10, 2020 14:21
Show Gist options
  • Save falseresync/2b073e51cd82e3541d49fca625c6d40f to your computer and use it in GitHub Desktop.
Save falseresync/2b073e51cd82e3541d49fca625c6d40f to your computer and use it in GitHub Desktop.
public class MyMod implements ModInitializer {
@Override
public void onInitialize() {
Registry.register(
// You want to register an item
Registry.ITEM,
// Your item ID will be my_mod:my_item
new Identifier("my_mod", "my_item"),
// Your item will appear in Miscellaneous tab
// There're more settings, take a look at those using
// your IDE autocompletion feature
new Item(new Item.Settings().group(ItemGroup.MISC))
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment