GregTechCEu Modern

GregTechCEu Modern

6M Downloads

Chunk Rendering Crash: GTCEu's try to access steam_vent Property in primitive_blast_furnace Block

open-owo opened this issue · 2 comments

commented

Checked for existing issues

  • I have checked for existing issues, and have found none.

Tested latest version

  • I have checked that this occurs on the latest version.

GregTech CEu Version

7.1.0

Minecraft Version

1.21.1 NeoForge

Recipe Viewer Installed

JEI

Environment

Multiplayer - Open to LAN

Cross-Mod Interaction

No

Other Installed Mods

GregTech CEu (7.1.0-SNAPSHOT), Sodium (0.6.13), Iris (1.8.12), Create (6.0.6), Applied Energistics 2 (19.2.14),Ender IO, TechReborn, RebornCore, Xaero's Minimap, Modern UI, JEI, FTB Ultimine,Inventory Profiles Next, Carry On, Neat, Jade,EnchantingInfuser-v21.1.1-1.21.1-NeoForge,BetterF3-11.0.3-NeoForge-1.21.1,TradeEnchantmentDisplay-neoforge-1.0.1+1.21,eatinganimation,sophisticatedbackpacks,sophisticatedcore,ftb-ultimine-neoforge,appleskin,Forgematica, MouseTweaks,CustomSkinLoader,connector-2.0.0-beta.8+1.21.1-full,CreeperFirework,lanserverproperties,architectury,badpackets-neo-0.8.2,bookshelf-neoforge-1.21.1-21.1.67,cloth-config-15.0.140-neoforge,forgified-fabric-api-0.115.6+2.1.1+1.21.1,ftb-library-neoforge-2101.1.18,geckolib-neoforge-1.21.1-4.7.6,gml-6.0.2,guideme-21.1.14,kotlinforforge-5.9.0-all,libIPN-neoforge-1.21-6.5.1,MaFgLib-0.3.6-mc1.21.1,PackagedAuto-1.21.1-4.0.5.14,pointblank-neoforge-1.21-1.9.6,PuzzlesLib-v21.1.37-1.21.1-NeoForge,trade-cycling-neoforge-1.21.1-1.0.18,Tweakerge-0.3.2-mc1.21.1

Expected Behavior

I roughly understand from the logs that the 'block:gtceu:lp_steam_solid_boiler' block seems should not access steam_vent properties, but sometimes it appears to wrongly access them, finally causing save corruption. Only deleting the crash-causing block can recover the save.

Actual Behavior

'block:gtceu:lp_steam_solid_boiler' block access steam_vent properties,finally causing save corruption

Steps to Reproduce

I don’t really understand how the bug happens, but I feel it occurs somewhat frequently. Similar bugs happened both days I played. Normally, when using the block:gtceu:lp_steam_solid_boiler during gameplay, everything works fine. But sometimes, for no apparent reason, such a crash suddenly occurs.

Additional Information

1.21.1-NeoForge_21.1.197.json

authlib-injector.log

crash-2025-08-11_15.36.19-client.txt

debug.log

fabricloader.log

latest.log

Output_before_game_crash.txt

PCL_log.txt

commented

I've had something similar on the same version but with the lv combustion generator.

Error: java.lang.IllegalArgumentException: Cannot get property EnumProperty{
name=steam_vent,
clazz=class com.gregtechceu.gtceu.api.multiblock.util.RelativeDirection,
values=[UP, DOWN, LEFT, RIGHT, FRONT, BACK]
} as it does not exist in gtceu:lv_combustion

I'm hosting a dedicated server, but the connected clients crash.

commented

If/when a dev gets around to this issue, I've done some testing with the code and it seems it's attempting to use a predicate from a different machine.

After adding a sanity check to the getStatePredicate function like so,

private Predicate<MachineRenderState> getStatePredicate(StateDefinition<MachineDefinition, MachineRenderState> def,
                                                        Property<?> property, String value) {
    Optional<?> optional = property.getValue(value);
    if (optional.isEmpty()) {
        throw new RuntimeException(
                String.format(Locale.ROOT, "Unknown value '%s' for property '%s' on '%s' in '%s'",
                        value, this.key, def.getOwner(), this.value));
    } else {
        return (state) -> {

            if (!state.hasProperty(property)) {
                GTCEu.LOGGER.warn(
                        "Predicate property '{}' is not in this state's definition (provided: '{}', defined with: '{}')",
                        property.getName(), state.toString(), def.getOwner().toString());
                return false;
            }

            return state.getValue(property).equals(optional.get());
        };
    }
}

it gave a warning like this:

Predicate property 'steam_vent' is not in this state's definition (provided: 'gtceu:lv_steam_turbine[recipe_logic_status=waiting]', defined with: 'gtceu:hp_steam_alloy_smelter')

While returning false when this issue arises does prevent the game from crashing, it appears to cause some of the blocks to turn invisible, so this is not a valid solution yet.

I'm continuing to find a solution, but thought I'd share what I've got so far.