mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-13 01:16:46 -04:00
particles: don't throw exception if no sprites available
important for <1.13
This commit is contained in:
parent
6449d2d54d
commit
70d736a289
@ -43,7 +43,9 @@ abstract class SimpleTextureParticle(connection: PlayConnection, position: Vec3d
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun setRandomSprite() {
|
fun setRandomSprite() {
|
||||||
texture = connection.rendering?.context?.textures?.staticTextures?.get(data.type.textures.random())
|
val textures = data.type.textures
|
||||||
|
if (textures.isEmpty()) return
|
||||||
|
texture = connection.rendering?.context?.textures?.staticTextures?.get(textures.random())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun tick() {
|
override fun tick() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user