Merge 1.18 into 1.19.2

This commit is contained in:
embeddedt 2023-08-03 17:01:12 -04:00
commit c5f73c5e26
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
2 changed files with 19 additions and 1 deletions

View File

@ -20,7 +20,7 @@ public class MinecraftMixin {
@Inject(method = "tick", at = @At("HEAD"))
private void onClientTick(CallbackInfo ci) {
if(this.overlay == null) {
if(this.overlay == null && ModernFixClient.INSTANCE != null) {
ModernFixClient.INSTANCE.onGameLaunchFinish();
}
}

View File

@ -0,0 +1,18 @@
package org.embeddedt.modernfix.forge.mixin.perf.resource_key_equality;
import net.minecraft.resources.ResourceKey;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
@Mixin(ResourceKey.class)
public class ResourceKeyMixin {
/**
* @author embeddedt
* @reason ResourceKeys are interned, so there is no reason to waste time doing any deeper comparison. This override
* is patched in by Forge, it doesn't exist in vanilla
*/
@Overwrite(remap = false)
public boolean equals(Object o) {
return o == this;
}
}