Merge remote-tracking branch 'origin/main' into 1.18

This commit is contained in:
embeddedt 2023-05-08 16:39:38 -04:00
commit 1639f4297e
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -25,14 +25,14 @@ import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
@Mixin(value = TextureAtlas.class, priority = 1500)
@Mixin(value = TextureAtlas.class, priority = 600)
@ClientOnlyMixin
public abstract class TextureAtlasMixin {
@Shadow protected abstract ResourceLocation getResourceLocation(ResourceLocation location);
@Shadow protected abstract Collection<TextureAtlasSprite.Info> getBasicSpriteInfos(ResourceManager resourceManager, Set<ResourceLocation> spriteLocations);
private Map<ResourceLocation, Pair<Resource, NativeImage>> loadedImages;
private Map<ResourceLocation, Pair<Resource, NativeImage>> loadedImages = new ConcurrentHashMap<>();
private boolean usingFasterLoad;
private Collection<TextureAtlasSprite.Info> storedResults;
/**
@ -48,7 +48,6 @@ public abstract class TextureAtlasMixin {
}
List<CompletableFuture<?>> futures = new ArrayList<>();
ConcurrentLinkedQueue<TextureAtlasSprite.Info> results = new ConcurrentLinkedQueue<>();
loadedImages = new ConcurrentHashMap<>();
for(ResourceLocation location : imageLocations) {
if(MissingTextureAtlasSprite.getLocation().equals(location))
continue;