Started by
marzales23@gmail.com
on
Topic category: Help with Minecraft modding (Java Edition)
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)
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.)
@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
Just find(ctrl + f) for "this.discard"
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?
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.