Merge 1.20 into 1.20.4
This commit is contained in:
commit
fa9d39bd31
|
|
@ -1,25 +0,0 @@
|
|||
package org.embeddedt.modernfix.forge.mixin.perf.forge_registry_lambda;
|
||||
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Overwrite;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
@Mixin(targets = {"net/minecraftforge/registries/RegistryDelegate"})
|
||||
public class RegistryDelegateMixin {
|
||||
@Shadow private ResourceLocation name;
|
||||
|
||||
/**
|
||||
* @author embeddedt
|
||||
* @reason avoid allocation in hashCode()
|
||||
*/
|
||||
@Overwrite(remap = false)
|
||||
public int hashCode() {
|
||||
ResourceLocation name = this.name;
|
||||
if(name != null) {
|
||||
return name.hashCode();
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user