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:
parent
ac194dc378
commit
a649cce2ea
1 changed files with 8 additions and 1 deletions
|
@ -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()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue