How can I get blocks/items that are allready registered by mcreator?

Started by Evolving_Code on

Topic category: Advanced modding

Last seen on 07:42, 26. Jun 2021
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I get blocks/items that are allready registered by mcreator?

I'm trying to register an IBlockColor, but I can't get block from elements list. Maybe I don't understand something? Please, help me to find sollution.

 

public void initElements() {
		elements.blocks.add(() -> new CustomBlock());
		Block regblock = <<get the block?>>;
		Minecraft.getInstance().getBlockColors()
			.register((state, world, pos, tintIndex) -> world != null && pos != null ? BiomeColors
				.getFoliageColor(world, pos) : FoliageColors.getDefault(), regblock);
		elements.items
				.add(() -> new BlockItem(block, new Item.Properties().group(ItemGroup.BUILDING_BLOCKS)).setRegistryName(block.getRegistryName()));
		
 	}

 

Last seen on 07:42, 26. Jun 2021
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
up
Wed, 04/01/2020 - 07:08

up