Object that embeds itself in the wall when thrown

Started by marzales23@gmail.com on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Object that embeds itself in the wall when thrown

Hello, I am trying to make Mjolnir and one of the phases of its development is that when it is thrown it remains embedded in a block. I have used procedures for this but I have some problems, in the first place when I launch the Mjolnir it generates its block but replaces the block it hits instead of generating it next to it (I don't know if they follow me) and the other problem is that it doesn't adjust the direction at the time it is generated (by putting the block directly using the Mjolnir Block item with rotation "Y axis rotation (S/W/N/E) rotation for player side" if it works but at the time of generating the block by procedures is not so)

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you simply want it to be…
Fri, 10/21/2022 - 13:01

If you simply want it to be embedded in a wall like a spear, go into the custom code and remove the section that says 'When in Ground Discard.' If you want it to replace itself with a block instead, it's going to look a little janky, but you'll just have to specify the block one in the opposite direction of the block the hammer is facing when it hits. (Essentially, when it hits a block, get the direction it's facing. You'll need six different possibilities for each direction if you want it to embed itself in any surface, and with each you'll just place the hammer-block with the correct direction in the correct location depending on which side it hit.)

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Mindthemoods Thank you very…
Sat, 10/22/2022 - 09:23

@Mindthemoods Thank you very much for answering. I was looking at the code for my range object from mcreator and didn't find the 'When in Ground Discard' section. I would like to know where to find that section so I can delete it

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Just find(ctrl + f) for …
Sat, 10/22/2022 - 14:37

Just find(ctrl + f) for "this.discard"

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
And once it got stuck in a…
Sun, 10/23/2022 - 11:46

And once it got stuck in a block, is there a way to make it go away so I can spawn an entity back to me?

 

Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
My idea is that when…
Sun, 10/23/2022 - 11:52

My idea is that when approaching it cannot be picked up like the arrows and when a period of ticks passes the hammer disappears to generate the entity but I don't know how to do that.