Topic category: Help with Minecraft modding (Java Edition)
Need to preface with I am an Autistic user who is mostly deaf, youtube tutorials are very hard for me because video words don't match, and video words are too fast for me. Normal words are better, they dont move and I can read them as slow as I need to. My eyes work beter than my ears. Words are still hard even when they are still, but I will try to explain what I am trying to do, sorry if my phrasing is not clear.
I made a tent that spawns when I click a block! It scarde me when it worked because I didnt think it would! Now I got it popping up, but I cant get it to spawn in front of me... It spawns all willynilly, or sometimes ON me! I died one time... I've only been using the program for a week, and have made pretty much everything I've been wanting to make, but getting my tent to pop-up where I am looking is being a great big pain in the butt!
The if/do language confuse me, but Im trying my best to work it out. I think it probably needs to be something like "If player direction = North, THEN, place nbt structure opposite of player at xyz" only Im having a very hard time making that idea work with the procedure legos... I think I need an If/then word-block-thing, I found if/then/else word blocks but the "else" part is messing me up, it yells at me when the else is left empy... If/do seems too simple, because I need where I am looking to be a thing in where my tent places.
Any help would help alot!
If your tent is just a block then you can use rotation from player side. But I dont know whats triggering the tent to be placed but if you need procedures then it must be some sort of trigger. East and west is the x-axis and north and south is the z-axis. Therefore you need to place the block x+1 or x-1 or z+1 or z-1 compared to you when facing different directions.
Something like this should place the tent at the block in front of the player, obviously if the trigger is right clicking on a block then theres no need to alter the x y z and just leave them as x y z. I have just seen you said its on right clicking a block so my bad. The tent will then change direction to face the player. For the spawning on top of you, it may just be that the bounding box is too big and maybe you want it to spawn a block away anyway. Let me know if it works or not.
Ok thanks I will try this, the item that spawns the tent is a block, but the tent is an actual nbt structure. I will try to get picures of my mess.
Im not sure how to share pictures, still figuring stuff out.
Imgur Mcreator Project
Ok I got a link for now, it should go to my mcreator project pics so you can see what its doing. I tried adding the code blocks, but it didn't seem to effect how the tent places.
Ok I didnt realise that it was a structure. On the structure procedure it has a rotation option make that opposite to the player facing direction. Because its a drop down list you would need to make 4 options for each direction like you have. You only need to remove the change direction of block as it isnt doing anything then just change the structure rotation to opposite of checked location in the if statement. Also when you make a structure and save it witha structure block the place where the structure block was located is where the structure will place from. So if you want the tent to always spawn with the door right in front of you, you might want to change the structure file so the structure block is in a better location.