Skip to content

ignoreSchematicsFromJar not working NeoForge 1.21.1 #752

Open

Description

@centmeteenvin

Is there an existing issue for this?

  • I have searched the existing issues.

Are you using the latest Structurize Version?

  • I am running the latest beta/release version of Structurize for my Minecraft version.
    I am also running the latest versions of other mods that are part of my problem.

Did you check on the Wiki? or ask on Discord?

  • I checked the MineColonies/Structurize Wiki or I asked on discord.

Minecraft Version

1.21

Structurize Version

1.0.778-1.21.1

MineColonies Version (if related bug)

1.1.984-1.21.1

Related Mods and their Versions

NeoForge: 21.1.173

Current Behavior

When setting the ignoreSchematicsFromJar value to true I am still able to see, access and place minecolonies defined structure packs.

#All configuration items related to the core gameplay
[gameplay]
	#Should the default schematics be ignored (from the jar)? [Default: false]
	ignoreSchematicsFromJar = true
	#Should player-made schematics be allowed? [Default: true]
	allowPlayerSchematics = true
	#Max world operations per tick (max blocks to place, remove, or replace). [Default: 1000, min: 0, max: 100000]
	# Default: 1000
	# Range: 0 ~ 100000
	maxOperationsPerTick = 1000
	#Max amount of undos saved. A higher number requires more memory. [Default: 50, min: 0, max: 250]
	# Default: 50
	# Range: 0 ~ 250
	maxCachedChanges = 50
	#Max amount of schematics to be cached on the server. [Default: 100, min: 0, max: 100000]
	# Default: 100
	# Range: 0 ~ 100000
	maxCachedSchematics = 100
	#Max amount of blocks checked by a possible worker. [Default: 1000, min: 0, max: 100000]
	# Default: 1000
	# Range: 0 ~ 100000
	maxBlocksChecked = 1000
	#How many block at most can be inside one scanned blueprint. [Default: 100000, min: 1000, max: 1000000]
	# Default: 100000
	# Range: 1000 ~ 1000000
	schematicBlockLimit = 100000
	#Currently supports 'default', 'inwardcircle', 'hilbert', 'random' and 'inwardcircleheight1' to 'inwardcircleheight4' [Default: default]
	iteratorType = "default"
Image

Expected Behavior

Only the player scans should be visible

Reproduction Steps

  1. Set value to true via either config screens or editing the toml file.
  2. Join singleplayer world with privileges.
  3. Use buildwand to open the GUI
  4. Switch packs still shows all options

Logs

https://gist.github.com/centmeteenvin/d2b284a429ed44354b962b2a863e7abc

Anything else?

No response

Footer


Viewers

  • Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
  • Add a comment if you have any insights or background information that isn't already part of the conversation.

Activity

  1. CollectorKeebler commented on Jul 1, 2025

    @CollectorKeebler

    Adding that I still see this bug as of:
    Neoforge 1.21.1

    MineColonies - 1.1.1020
    Structurize 1.0.780

    Thanks!

  2. Petarda-Atomica commented on Feb 16, 2026

    @Petarda-Atomica

    Still an issue on:
    Forge 1.20.1 47.4.10
    MineColonies - 1.1.1183-snapshot
    Structurize - 1.0.800

    I think I found where the bug is. In Structurize/src/main/java/com/ldtteam/structurize/storage/ServerStructurePackLoader.java , from what I understand, the code at line 83 is responsible for loading structure packs from the jar, but there is no code to check for the server config. Searching the ignoreSchematicsFromJar symbol confirms that this argument is never used anywhere in the code, besides when it is defined. Hope that helps!

  3. Petarda-Atomica commented on Feb 16, 2026

    @Petarda-Atomica

    Did a bit more digging around. The same problem is also in Structurize/src/main/java/com/ldtteam/structurize/storage/ClientStructurePackLoader.java

    Also, these get run before the server configs have been parsed. Managed to fix that by doing in Structurize/src/main/java/com/ldtteam/structurize/Structurize.java:

    DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> {
        // 1. Keep the existing registrations
        Mod.EventBusSubscriber.Bus.FORGE.bus().get().register(ClientStructurePackLoader.class);
        Mod.EventBusSubscriber.Bus.FORGE.bus().get().register(ClientFutureProcessor.class);
        Mod.EventBusSubscriber.Bus.MOD.bus().get().register(ClientLifecycleSubscriber.class);
        Mod.EventBusSubscriber.Bus.FORGE.bus().get().register(ClientEventSubscriber.class);
    
        // 2. Add a listener for when the SERVER config arrives on the CLIENT
        IEventBus modBus = FMLJavaModLoadingContext.get().getModEventBus();
        modBus.addListener((ModConfigEvent.Loading event) -> {
            if (event.getConfig().getType() == ModConfig.Type.SERVER) {
                // This now fires only after the client has synced with the server/world
                ClientStructurePackLoader.onClientLoading();
            }
        });
    });
    
    IEventBus modBus = FMLJavaModLoadingContext.get().getModEventBus();
    
    modBus.addListener((ModConfigEvent.Loading event) -> {
        if (event.getConfig().getType() == ModConfig.Type.SERVER) {
            Log.getLogger().info("Structurize: Server config loaded. Initializing Structure Pack Loader.");
            ServerStructurePackLoader.onServerStarting();
        }
    });

    As far as I am aware this doesn't break anything, could be wrong. Also, the moment schematics get loaded from JARs, the setting becomes useless again. Basically, it only works if the world never had the option ignoreSchematicsFromJar set to false. I suspect it would be something to do with caching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions