Fix static member ordering crash in UnitSprite (#8839)

The previous ordering caused LOCATION to be null during the construction
of the UnitSprite INSTANCE, leading to errors as the atlas location for
the sprite would be null.

Fixes #8795
This commit is contained in:
sciwhiz12 authored and GitHub committed 2022-07-09 18:53:10 +09:30
1 parent 1b25285462
commit 87abbdb8ef
1 file changed
+1 -1
@@ -19,8 +19,8 @@ import java.util.function.Function;
*/
public class UnitSprite extends TextureAtlasSprite
{
public static final UnitSprite INSTANCE = new UnitSprite();
public static final ResourceLocation LOCATION = new ResourceLocation("forge", "unit");
public static final UnitSprite INSTANCE = new UnitSprite();
public static final Function<Material, TextureAtlasSprite> GETTER = (x) -> INSTANCE;
private UnitSprite()