Skip to content

IllegalArgumentException causing intermittent crash for FluidLoggable blocks #496

@Roelymole

Description

@Roelymole

Version Information

fe20e26

Log or Crash Report

No response

Reproduction steps

Custom fluids are not always registered in the BuiltInRegistries.FLUID registry at the time when the possible values for the FluidLoggable.FLUID blockstate property are registered.

Attempting to load a chunk containing an invalid blockstate will cause the chunk to be reset.

Image

[00:51:41] [Server thread/ERROR] (Minecraft) Failed to load chunk -5,-11 java.lang.IllegalArgumentException: Value galacticraft:crude_oil_still does not belong to property {name=fluid, clazz=class net.minecraft.resources.ResourceLocation, values=[minecraft:flowing_water, minecraft:water, minecraft:flowing_lava, minecraft:lava, minecraft:empty, minecraft:invalid]}

Fluidlogging a new block will cause a crash.

java.lang.IllegalArgumentException: Cannot set property {name=fluid, clazz=class net.minecraft.resources.ResourceLocation, values=[minecraft:flowing_water, minecraft:water, minecraft:flowing_lava, minecraft:lava, minecraft:empty, minecraft:invalid]} to galacticraft:crude_oil_still on Block{galacticraft:walkway}, it is not an allowed value

One possible workaround I can think of is to load the list of fluids from a config file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions