Fixed Bug in TextureAtlasMixin
This commit is contained in:
parent
cb7d8cf53d
commit
c7117fa180
1 changed files with 5 additions and 6 deletions
|
@ -17,6 +17,7 @@ import ru.bclib.BCLib;
|
|||
import ru.bclib.client.render.EmissiveTextureInfo;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Optional;
|
||||
|
||||
@Mixin(TextureAtlas.class)
|
||||
|
@ -54,16 +55,14 @@ public class TextureAtlasMixin {
|
|||
NativeImage emission = null;
|
||||
try {
|
||||
ResourceLocation spriteLocation = new ResourceLocation(
|
||||
location.getNamespace(),
|
||||
"textures/" + location.getPath() + ".png"
|
||||
location.getNamespace(),
|
||||
"textures/" + location.getPath() + ".png"
|
||||
);
|
||||
Resource resource = resourceManager.getResource(spriteLocation).orElse(null);
|
||||
sprite = NativeImage.read(resource.open());
|
||||
sprite.close();
|
||||
sprite = NativeImage.read( resource.open());
|
||||
|
||||
resource = emissiveRes.get();
|
||||
emission = NativeImage.read(resource.open());
|
||||
emission.close();
|
||||
emission = NativeImage.read( resource.open());
|
||||
}
|
||||
catch (IOException e) {
|
||||
BCLib.LOGGER.warning(e.getMessage());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue