Merge remote-tracking branch 'origin/main' into 1.18
This commit is contained in:
commit
1639f4297e
|
|
@ -25,14 +25,14 @@ import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||||
|
|
||||||
@Mixin(value = TextureAtlas.class, priority = 1500)
|
@Mixin(value = TextureAtlas.class, priority = 600)
|
||||||
@ClientOnlyMixin
|
@ClientOnlyMixin
|
||||||
public abstract class TextureAtlasMixin {
|
public abstract class TextureAtlasMixin {
|
||||||
@Shadow protected abstract ResourceLocation getResourceLocation(ResourceLocation location);
|
@Shadow protected abstract ResourceLocation getResourceLocation(ResourceLocation location);
|
||||||
|
|
||||||
@Shadow protected abstract Collection<TextureAtlasSprite.Info> getBasicSpriteInfos(ResourceManager resourceManager, Set<ResourceLocation> spriteLocations);
|
@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 boolean usingFasterLoad;
|
||||||
private Collection<TextureAtlasSprite.Info> storedResults;
|
private Collection<TextureAtlasSprite.Info> storedResults;
|
||||||
/**
|
/**
|
||||||
|
|
@ -48,7 +48,6 @@ public abstract class TextureAtlasMixin {
|
||||||
}
|
}
|
||||||
List<CompletableFuture<?>> futures = new ArrayList<>();
|
List<CompletableFuture<?>> futures = new ArrayList<>();
|
||||||
ConcurrentLinkedQueue<TextureAtlasSprite.Info> results = new ConcurrentLinkedQueue<>();
|
ConcurrentLinkedQueue<TextureAtlasSprite.Info> results = new ConcurrentLinkedQueue<>();
|
||||||
loadedImages = new ConcurrentHashMap<>();
|
|
||||||
for(ResourceLocation location : imageLocations) {
|
for(ResourceLocation location : imageLocations) {
|
||||||
if(MissingTextureAtlasSprite.getLocation().equals(location))
|
if(MissingTextureAtlasSprite.getLocation().equals(location))
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user