Modified SimpleModelState to ignore the parts it doesn't know about. Fixes model part hiding always applying to some models when transformations are specified in the blockstate json.

This commit is contained in:
RainWarrior 2016-06-05 10:14:44 +03:00
parent ac194dc378
commit a649cce2ea

View file

@ -28,7 +28,14 @@ public final class SimpleModelState implements IModelState
public Optional<TRSRTransformation> apply(Optional<? extends IModelPart> part)
{
if(!part.isPresent() || !map.containsKey(part.get())) return def;
if(!part.isPresent())
{
return def;
}
if(!map.containsKey(part.get()))
{
return Optional.absent();
}
return Optional.fromNullable(map.get(part.get()));
}
}