mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
There's no Map.getOrDefault in java6.
This commit is contained in:
1 parent
8f65678b99
commit
74501f509f
2 files changed
+6
-3
No files matched your search
@@ -52,7 +52,9 @@ public interface IPerspectiveState extends IModelState
|
||||
|
||||
public IModelState forPerspective(TransformType type)
|
||||
{
|
||||
return states.getOrDefault(type, TRSRTransformation.identity());
|
||||
IModelState state = states.get(type);
|
||||
if(state == null) state = TRSRTransformation.identity();
|
||||
return state;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -144,8 +144,9 @@ public class ItemLayerModel implements IRetexturableModel {
|
||||
@Override
|
||||
public Pair<IBakedModel, Matrix4f> handlePerspective(TransformType cameraTransformType)
|
||||
{
|
||||
TRSRTransformation tr = transforms.getOrDefault(cameraTransformType, TRSRTransformation.identity());
|
||||
Matrix4f mat = tr == TRSRTransformation.identity() ? null : tr.getMatrix();
|
||||
TRSRTransformation tr = transforms.get(cameraTransformType);
|
||||
Matrix4f mat = null;
|
||||
if(tr != null && tr != TRSRTransformation.identity()) mat = tr.getMatrix();
|
||||
return Pair.of((IBakedModel)this, mat);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user