Started by
firenight
on
Topic category: Help with Minecraft modding (Java Edition)
I'm making a mod where the player switches dimensions without the use of a portal and I need a way to store his inventory and location in an entity, to go back, he is teleported to the entity and he gets his inventory back. If the player dies in that dimension, his stuff needs to disappear and the entity storing the data dies and drops the stuff on the ground. How do I do that?
for the location it's really easy, i am making a mod a bit similar as yours, you have to set a global map number variable then set it to x (and two other for y and z) then when the player gets back you have to teleport him to the location stored in your var ! You have to link this procedure to maybe "when player leave dimension" or (that s what i do because i put a timer in my dimension) you provide to your player a custom potion effect and when it stop you TP him
Thanks alot! I didn't know we could make global variables. What type of mod are you working on? , I'm also using a timer.