TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Crash with flowing fluid into a sign.

alcatrazEscapee opened this issue ยท 0 comments

commented

crash-2022-09-11_02.21.41-client.txt

Culprit is TFCStandingSignBlock.getStateForPlacement not checking if the fluid exists in the fluid property before attempting to get a key for it.

public BlockState getStateForPlacement(BlockPlaceContext context)
{
FluidState fluidstate = context.getLevel().getFluidState(context.getClickedPos());
return defaultBlockState()
.setValue(ROTATION, Mth.floor((double) ((180.0F + context.getRotation()) * 16.0F / 360.0F) + 0.5D) & 15)
.setValue(FLUID, getFluidProperty().keyFor(fluidstate.getType()));
}

Should use keyForOrEmpty instead of keyFor