How can I modify an existing block/entity?

Started by sempronio1 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I modify an existing block/entity?

I want to modify the ender dragon egg, but I don't know how to do it

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Modifying or removing…
Tue, 11/14/2023 - 17:00

Modifying or removing vanilla items is difficult, as you normally can't modify vanilla code. The way people usually do this is by using workarounds to replace the vanilla block with their own modded version, without the player noticing. You would make a modded version of the dragon egg, and then either change the loot table of the vanilla dragon egg so it drops your own, or find a way to replace the block when it generates, depending on how you need it to function. (This would also be pretty straight forward, since the dragon egg always falls at the same position.) 

For simpler things, you could conceivably just run procedures involving the vanilla block; but in most cases where you want to seriously modify something, replacing it with your own version is a better course of action.