How to use a different mod's block to grow a crop on?

Started by thegrandseraph on

Topic category: Help with MCreator software

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to use a different mod's block to grow a crop on?

I am trying to create a custom crop that grows on resource blocks to essentially make more of them. It works great on vanilla resources but, since I use Create in every pack, I figured I would make one for zinc. The only problem is, when I try to make it use zinc as a resource block to grow on, there isn't an option to use a tag (in this case create:raw_zinc_block). So I figured I would use a filler (raw iron block) and edit it in the code. The only place I found that has a reference to the iron block however is the .java file, as seen below. 

How do I make this reference the create mod's zinc block?

pic of code

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The pic of the code didn't…
Fri, 12/22/2023 - 16:20

The pic of the code didn't take, so here it is cut and pasted.

 

    @Override

public boolean canSurvive(BlockState blockstate, LevelReader worldIn, BlockPos pos) {
BlockPos blockpos = pos.below();
BlockState groundState = worldIn.getBlockState(blockpos);
return groundState.is(this) || groundState.is(Blocks.RAW_IRON_BLOCK);