This commit is contained in:
Phoenix-Starlight 2023-10-12 17:30:56 -07:00
parent 538d332310
commit 495b26bc98

View File

@ -32,6 +32,8 @@ public abstract class SoundBufferLibraryMixin {
.asMap();
private <K extends ResourceLocation, V extends CompletableFuture<SoundBuffer>> void onSoundRemoval(RemovalNotification<K, V> notification) {
if(notification.getCause() == RemovalCause.REPLACED && notification.getValue() == cache.get(notification.getKey()))
return;
notification.getValue().thenAccept(SoundBuffer::discardAlBuffer);
if(debugDynamicSoundLoading) {
K k = notification.getKey();