Fix injector target

This commit is contained in:
embeddedt 2023-04-26 14:15:35 -04:00
parent 821a15ecaa
commit a4515e8eae
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -36,7 +36,7 @@ public class CompoundTagMixin {
* @author embeddedt
* @reason use more efficient method when copying canonizing string map
*/
@Inject(method = "copy()Lnet/minecraft/nbt/Tag;", at = @At("HEAD"), cancellable = true)
@Inject(method = "copy()Lnet/minecraft/nbt/CompoundTag;", at = @At("HEAD"), cancellable = true)
public void copyEfficient(CallbackInfoReturnable<Tag> cir) {
if(this.tags instanceof CanonizingStringMap) {
cir.setReturnValue(new CompoundTag(CanonizingStringMap.deepCopy((CanonizingStringMap<Tag>)this.tags, Tag::copy)));