Skip to content

Commit

Permalink
Ghosts with no bits should not crash? Fixes #418
Browse files Browse the repository at this point in the history
  • Loading branch information
AlgorithmX2 committed Aug 14, 2018
1 parent 2010b9e commit c1e12f7
Showing 1 changed file with 10 additions and 1 deletion.
Expand Up @@ -645,7 +645,16 @@ public void setBlob(
{
if ( common.mostCommonState == 0 )
{
common.mostCommonState = getBasicState().getValue( BlockChiseled.UProperty_Primary_BlockState );
Integer i = getBasicState().getValue( BlockChiseled.UProperty_Primary_BlockState );
if ( i != null )
{
common.mostCommonState = i;
}
else
{
// default to some other non-zero state.
common.mostCommonState = ModUtil.getStateId( Blocks.STONE.getDefaultState() );
}
}

sideState = sideFlags;
Expand Down

0 comments on commit c1e12f7

Please sign in to comment.