Changing a vanilla block feature

Started by Sheppboi on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Changing a vanilla block feature

Is there any way that I can allow plant sustainability on end stone? I have been researching and can't find anything relating to changing a parameter. If you do find anything related that I can use, please link it. I want to make the end a lush place as a part of Singularity's 1.0 update.

Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well, yes and no. This can…
Fri, 02/26/2021 - 18:46

Well, yes and no.

This can be done but only with coding(as I know).

Just insert this:

@Override
		protected boolean isValidGround(BlockState state, IBlockReader worldIn, BlockPos pos) {
     		Block block = state.getBlock();
     		return block == Blocks.END_STONE;
		}

in the class of your block and that's it.(Also press ctrl+w, it will add all required imports)

 

But I think you can also try making a block that looks like a plant, then you need to create a procedure with a global trigger "a block is placed", and then

If get block at X Y Z == *your flower block*

do: if  not get block at X Y-1 Z == End Stone

      do: Cancel event that triggered global trigger