Skip to content

Commit 31f0a20

Browse files
committed
Fix bug affecting LoliASM
Accessing framesTextureData.size(), resulting in a weird IndexOutOfBoundsException in manipulated bytecode.
1 parent add2ab4 commit 31f0a20

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

common/logisticspipes/proxy/ccl/Model3D.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ public void render(I3DOperation... i3dOperations) {
7777
model.render(CCRenderState.instance(), list.toArray(new IVertexOperation[0]));
7878
}
7979

80+
private String atlasString(TextureAtlasSprite sprite) {
81+
return "name='" + sprite.getIconName() + "', x=" + sprite.getOriginX() + ", y=" + sprite.getOriginY() + ", height=" + sprite.getIconHeight() + ", width=" + sprite.getIconWidth() + ", u0=" + sprite.getMinU() + ", u1=" + sprite.getMaxU() + ", v0=" + sprite.getMinV() + ", v1=" + sprite.getMaxV() + "}";
82+
}
83+
8084
@Override
8185
@SideOnly(Side.CLIENT)
8286
@SneakyThrows({ IllegalAccessException.class })
@@ -90,7 +94,7 @@ public List<BakedQuad> renderToQuads(VertexFormat format, I3DOperation... i3dOpe
9094
IVertexOperation iVertexOperation = (IVertexOperation) op.getOriginal();
9195
list.add(iVertexOperation);
9296
if (iVertexOperation instanceof IconTransformation) {
93-
hash.add(((IconTransformation) iVertexOperation).icon.toString());
97+
hash.add(atlasString(((IconTransformation) iVertexOperation).icon));
9498
} else if (iVertexOperation instanceof Rotation) {
9599
hash.add(iVertexOperation.toString());
96100
} else if (iVertexOperation instanceof Scale) {

0 commit comments

Comments
 (0)