I have a simple code that should write "Yes" if the structure exists:
ServerLevel level = Minecraft.getInstance().getSingleplayerServer().getLevel(Level.OVERWORLD);
StructureTemplateManager templateManager = level.getStructureManager();
Optional<StructureTemplate> optional = templateManager.get(new ResourceLocation(TestMod.MOD_ID, "structures/shop1.nbt"));
if(optional.isPresent()){
System.out.println("Yes");
}
But nothing happens...
What am I missing?