Canvas Renderer

Canvas Renderer

202k Downloads

Particle texture error with occasional crash after resource reload

spiralhalo opened this issue ยท 2 comments

commented

Seems like a continuation of #235.

Terrain textures are fixed. Now particle textures are affected instead. Entity textures seem to stay unaffected.

Tested canvas version: canvas-mc117-1.17-1.0.1707
Tested resource pack: Jicklus 1.17
Other resource packs: LumiLights, LumiPBRExt. LumiPBRCompat, canvas/default

How you triggered the behavior

  • Start minecraft without the test resource pack loaded
  • Load a world
  • Load the test resource pack
  • Use a fireworks rocket or place a torch (both particles seem affected)
  • Compare visual with vanilla

Logs and screenshots

image

Log: https://gist.github.com/spiralhalo/3943052f8fe28996845340970d1be9b1

commented

Additional information:

  • The particles are displayed correctly after F3+T.
commented

Additional information:

  • Sometimes the game would crash from rendering absurd particle sprite index.
  • The crash is consistently reproducible by switching to Vanilla from Jicklus (Jicklus must be in correct state before switching).
java.lang.IndexOutOfBoundsException: Index (1267) is greater than or equal to list size (141)
	at it.unimi.dsi.fastutil.objects.ObjectArrayList.get(ObjectArrayList.java:309)
	at grondag.canvas.texture.SpriteIndex.fromId(SpriteIndex.java:69)
	at grondag.canvas.texture.MaterialIndexProvider$AtlasIndexProvider$Indexer.lambda$index$0(MaterialIndexProvider.java:91)
	at it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap.computeIfAbsent(Int2IntOpenHashMap.java:521)
	at grondag.canvas.texture.MaterialIndexProvider$AtlasIndexProvider$Indexer.index(MaterialIndexProvider.java:89)
	at grondag.canvas.buffer.format.CanvasVertexFormats.lambda$static$0(CanvasVertexFormats.java:92)
	at grondag.canvas.buffer.encoding.VertexCollectorList$Consumer.emit(VertexCollectorList.java:58)
	at grondag.canvas.buffer.encoding.VertexCollectorList$Consumer.emit(VertexCollectorList.java:46)
	at grondag.canvas.apiimpl.mesh.MutableQuadViewImpl.next(MutableQuadViewImpl.java:351)
	at net.minecraft.client.particle.SpriteBillboardParticle.buildGeometry(SpriteBillboardParticle.java:592)
	at grondag.canvas.render.world.CanvasParticleRenderer.renderParticles(CanvasParticleRenderer.java:105)
	at grondag.canvas.render.world.CanvasWorldRenderer.renderWorld(CanvasWorldRenderer.java:612)
	at grondag.canvas.render.world.CanvasWorldRenderer.render(CanvasWorldRenderer.java:769)
	at net.minecraft.client.render.GameRenderer.renderWorld(GameRenderer.java:1001)
	at net.minecraft.client.render.GameRenderer.render(GameRenderer.java:806)
	at net.minecraft.client.MinecraftClient.render(MinecraftClient.java:1114)
	at net.minecraft.client.MinecraftClient.run(MinecraftClient.java:730)
	at net.minecraft.client.main.Main.main(Main.java:217)