More NPE Guards

This commit is contained in:
simibubi 2023-07-04 17:56:30 +02:00
parent a6a4078356
commit 064dc1e247

View file

@ -137,7 +137,7 @@ public abstract class CopycatModel extends BakedModelWrapperWithData {
@Nullable
public static BlockState getMaterial(ModelData data) {
BlockState material = data.get(MATERIAL_PROPERTY);
BlockState material = data == null ? null : data.get(MATERIAL_PROPERTY);
return material == null ? AllBlocks.COPYCAT_BASE.getDefaultState() : material;
}