Reset StitchedSprites when the atlas is stitched

- Might fix simi's slime issue
This commit is contained in:
JozsefA 2021-06-26 16:05:15 -07:00
parent 2cad7233ef
commit f85fce3603
2 changed files with 6 additions and 1 deletions

View file

@ -33,6 +33,7 @@ public class AtlasStitcher {
.equals(PlayerContainer.BLOCK_ATLAS_TEXTURE))
return;
sprites.forEach(StitchedSprite::reset);
sprites.stream()
.map(StitchedSprite::getLoc)
.forEach(event::addSprite);

View file

@ -11,7 +11,7 @@ public class StitchedSprite {
TextureAtlasSprite sprite;
public StitchedSprite(ResourceLocation loc) {
StitchedSprite(ResourceLocation loc) {
this.loc = loc;
}
@ -28,4 +28,8 @@ public class StitchedSprite {
return sprite;
}
void reset() {
sprite = null;
}
}