Hello, I'm currently generating a structure in my mod and I was trying to make it generate at least 2000blocks away from the spawn point. I tried getting de pos of the spawn point and the structure to check if it's 2000blocks away. The problem is that since the Structure hasn't been generated yet It returns null. I was wondering if there's a way to get the Pos of the structure before it generates or set a radius in which the structure can't generate.
Here's my GitLab: https://gitlab.com/endrem/end-remastered
Never mind, I fixed it. I just forgot to .get() my END_CASTLE in the main class.
Thank you for your great help. You gave me advice without telling me exactly what to do, so I had to read and learn, and I appreciate that.
I registered the castle using DeferredRegister and it doesn't crash anymore, however the structure isn't spawning and the /locate commande doesn't work too.
I tried overriding getStructureName() but the /locate commande says that the structure couldn't be found.
You can look by yourself here https://github.com/ShteKentoker/EndRem1.16.4
Gotcha for the override I took care of that. For the registry on the other hand, I'm not sure where I should register the structure. Should it be in my RegistryHandler with my blocks and items ? Since I use DeferredRegister there shouldn't be any problem.
https://github.com/ShteKentoker/EndRem1.16.4
Here's my GitHub
Btw, the game crashs when I try to create a new world and I tried removing every file linked to the structure and the game stopped crashing.
Hello, I wanted to know if there's a way to get a specific block position in the world. For exemple getting the coordinates of the closest End frame or the closest Ancient Debris.
Thank you.
So I'm trying to make a block that when I right click on with a certain item it spawn a portal of the end arround the block. The problem is even though the end block appears, it doesn't do anything so I don't know if the way I did it is wrong or if I'm missing something but I can't figure out why the end block doesn't teleport to the end.
btw I'm a beginer so if you have some documentations that I should read to help me it would be awesome