Copy Mushroom Block behavior

Started by Hipst3rFox on Wed, 01/27/2021 - 17:23

Topic category: Help with modding (Java Edition)

Last seen on 14:09, 15. May 2022
Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Copy Mushroom Block behavior
Wed, 01/27/2021 - 17:24 (edited)

Hi!

So for my mod, I'm trying to create new types of Mushroom Blocks, but I cannot figure out how to implement the behavior vanilla mushroom blocks have (all sides are the "outside" texture, until a mushroom block is placed in one of the adjecent spots; then the texture of that side is changed to the "inside" texture and keeps this texture until the block is broken).

The only way I've been able to do this, is by creating tons and tons of blocks with combinations of inside and outside textures, and replacing the main block (all sides outside texture) with one of the other blocks when placed next to eachother, but this is far from optimal.

I don't know much about coding and extending and injection minecraft code, but my guess is that you can copy/extend the behavior of the "HugeMushroomBlock.java" in order to achieve the same effect. Does anyone have an idea how to do something like this?

(I hope my explanation is clear enough) Thanks!

Edited by Hipst3rFox on Wed, 01/27/2021 - 17:24