B3D loader: removed 2 redundand null checks, changed constructor args to final to fix (java6?) inner arg error.
This commit is contained in:
parent
f9024d2eb3
commit
f6ab01843c
|
@ -313,7 +313,7 @@ public class B3DLoader implements ICustomModelLoader
|
||||||
TRSRTransformation ret = TRSRTransformation.identity();
|
TRSRTransformation ret = TRSRTransformation.identity();
|
||||||
Key key = null;
|
Key key = null;
|
||||||
if(animation != null) key = animation.getKeys().get(frame, node);
|
if(animation != null) key = animation.getKeys().get(frame, node);
|
||||||
else if(key == null && node.getAnimation() != null && node.getAnimation() != animation) key = node.getAnimation().getKeys().get(frame, node);
|
else if(node.getAnimation() != null && node.getAnimation() != animation) key = node.getAnimation().getKeys().get(frame, node);
|
||||||
if(key != null)
|
if(key != null)
|
||||||
{
|
{
|
||||||
Node<?> parent = node.getParent();
|
Node<?> parent = node.getParent();
|
||||||
|
@ -710,7 +710,7 @@ public class B3DLoader implements ICustomModelLoader
|
||||||
|
|
||||||
private ImmutableList<BakedQuad> quads;
|
private ImmutableList<BakedQuad> quads;
|
||||||
|
|
||||||
public BakedWrapper(Node<?> node, IModelState state, VertexFormat format, ImmutableSet<String> meshes, ImmutableMap<String, TextureAtlasSprite> textures)
|
public BakedWrapper(final Node<?> node, final IModelState state, final VertexFormat format, final ImmutableSet<String> meshes, final ImmutableMap<String, TextureAtlasSprite> textures)
|
||||||
{
|
{
|
||||||
this(node, state, format, meshes, textures, CacheBuilder.newBuilder()
|
this(node, state, format, meshes, textures, CacheBuilder.newBuilder()
|
||||||
.maximumSize(128)
|
.maximumSize(128)
|
||||||
|
@ -720,16 +720,12 @@ public class B3DLoader implements ICustomModelLoader
|
||||||
public BakedWrapper load(Integer frame) throws Exception
|
public BakedWrapper load(Integer frame) throws Exception
|
||||||
{
|
{
|
||||||
IModelState parent = state;
|
IModelState parent = state;
|
||||||
Animation newAnimation = null;
|
Animation newAnimation = node.getAnimation();
|
||||||
if(parent instanceof B3DState)
|
if(parent instanceof B3DState)
|
||||||
{
|
{
|
||||||
B3DState ps = (B3DState)parent;
|
B3DState ps = (B3DState)parent;
|
||||||
parent = ps.getParent();
|
parent = ps.getParent();
|
||||||
}
|
}
|
||||||
if(newAnimation == null)
|
|
||||||
{
|
|
||||||
newAnimation = node.getAnimation();
|
|
||||||
}
|
|
||||||
return new BakedWrapper(node, new B3DState(newAnimation, frame, frame, 0, parent), format, meshes, textures);
|
return new BakedWrapper(node, new B3DState(newAnimation, frame, frame, 0, parent), format, meshes, textures);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue