Started by
slow_as_a_sloth
on
Topic category: Help with Minecraft modding (Java Edition)
Okay what i wanna know is, IS it possible to make it so i have like a custom demension and in said demension a structure spawns so basically like you go into a demension and a castle spawns but there is only ONE and it only spawns in that demension im tryna make like a portal to a new world with houses and stuff but i only want that stuff to spawn ONCE in that demension so someone cnat just walk to the same structures
You're probably want to make a global logic variable, (I'll call it, 'structure-spawned,' should be set to false by default), and then make a procedure which triggers when a player enters your dimension. (Or just on update tick if the player is in your dimension), checks if the variable is false, and if it is, generates your structure and sets the variable to true. Global variables affect the entire world, so once the structure generates once, unless the variable is reset, it will never generate again.
How would i spawn it tho? :))
In 2023.4, use feature mod element and use additional generation condition. In the condition, check and set this variable