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

Started by Evolving_Code on Sat, 03/28/2020 - 13:46

Topic category: Advanced modding

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How can I get blocks/items that are allready registered by mcreator?
Sat, 03/28/2020 - 13:46

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:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
up
Wed, 04/01/2020 - 07:08

up