Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Advance Features!

Mr Zombii edited this page Sep 26, 2024 · 6 revisions

Advance features

here a quick list of features!

  • Custom Items & blocks
  • multi texture for Items
  • Custom Block entities
  • Custom Recipes (Can not override CR's Recipes)
  • Custom Commands
  • Zone generators (Custom world generator)
  • Customization your Mod page (Mod's bottom page in ModMenu)

notes: most of these features are already available in the mod example

How To guide

DataMods can be add into the jar of your mod, good for if you want to add a base block!

Before we go down the list, Your Mod class file need to have PuzzleRegistries.EVENT_BUS.register(this);
inside onInit() method. This is necessary to register most of the features!

Items

To create an Item in java do the following...

  1. Create class & implements IModItem.

  2. Import the necessary method IModItem needs.

  3. Now in Mod class in onInit() do IModItem.registerItem(new YOUR_ITEM_CLASS());

  4. To add an texture call addTexture(IModItem.MODEL_2_5D_ITEM, new ResourceLocation(Constants.MOD_ID, "textures/items/TEXTURE_NAME.png")) in your Item class Constructor.

  5. If your item need to have multiple texture use the same addTexture

  6. To forces Item texture to change use setCurrentEntry.

Blocks

To create an Block just need to implement IModBlock

  • Import the necessary method IModItem needs.

Blocks States

Blocks States is part of CR game and is how blocks are render & interact with!

  1. To start Override getBlockGenerator() with your block.
  2. Create a new BlockGenerator().
  3. Call createBlockState() this will return an State & you use this method to create more blocks states!
  4. If you need an Block Entity use addBlockEntity().

Block Entity

If an block needs to be tick or store items it best to use an Block Entity

  1. Your class need to extends ExtendedBlockEntity.
  2. Import the necessary constructor ExtendedBlockEntity needs.
  3. After that just need to register it by use BlockEntityCreator.registerBlockEntityCreator().

Commands

Creating an Command is simple CommandManager.literal("YOURCOMMAND") use ExampleMod Command as a guide.

Clone this wiki locally