mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 23:03:01 +00:00
Add some null safety for extended state props
This commit is contained in:
1 parent
42efc07d3a
commit
3cc755f33d
3 files changed
+6
-4
No files matched your search
@@ -112,7 +112,9 @@ public class TileEntityGlowPanel extends TileEntity implements ITileNetwork
|
||||
public static int hash(IExtendedBlockState state)
|
||||
{
|
||||
int hash = 1;
|
||||
hash = 31 * hash + state.getValue(PropertyColor.INSTANCE).color.ordinal();
|
||||
PropertyColor propColor = state.getValue(PropertyColor.INSTANCE);
|
||||
EnumColor color = propColor != null ? propColor.color : EnumColor.WHITE;
|
||||
hash = 31 * hash + color.ordinal();
|
||||
hash = 31 * hash + state.getValue(BlockStateFacing.facingProperty).ordinal();
|
||||
|
||||
return hash;
|
||||
|
||||
Reference in new issue
Block a user