Use unmapped name for shadow method

This commit is contained in:
embeddedt 2023-05-01 21:12:14 -04:00
parent 81a2b9cb56
commit 6879c6a274
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -33,10 +33,7 @@ import org.embeddedt.modernfix.duck.IExtendedModelBakery;
import org.embeddedt.modernfix.dynamicresources.DynamicBakedModelProvider; import org.embeddedt.modernfix.dynamicresources.DynamicBakedModelProvider;
import org.embeddedt.modernfix.dynamicresources.ModelBakeryHelpers; import org.embeddedt.modernfix.dynamicresources.ModelBakeryHelpers;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect; import org.spongepowered.asm.mixin.injection.Redirect;
@ -60,7 +57,8 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
@Shadow @Final public static ModelResourceLocation MISSING_MODEL_LOCATION; @Shadow @Final public static ModelResourceLocation MISSING_MODEL_LOCATION;
@Shadow protected abstract BlockModel loadBlockModel(ResourceLocation location) throws IOException; @Dynamic
@Shadow(remap = false) protected abstract BlockModel method_4718(ResourceLocation location) throws IOException;
@Shadow @Final protected ResourceManager resourceManager; @Shadow @Final protected ResourceManager resourceManager;
@Shadow private AtlasSet atlasSet; @Shadow private AtlasSet atlasSet;
@ -134,7 +132,7 @@ public abstract class ModelBakeryMixin implements IExtendedModelBakery {
@Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/resources/model/ModelBakery;loadBlockModel(Lnet/minecraft/resources/ResourceLocation;)Lnet/minecraft/client/renderer/block/model/BlockModel;", ordinal = 0)) @Redirect(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/resources/model/ModelBakery;loadBlockModel(Lnet/minecraft/resources/ResourceLocation;)Lnet/minecraft/client/renderer/block/model/BlockModel;", ordinal = 0))
private BlockModel captureMissingModel(ModelBakery bakery, ResourceLocation location) throws IOException { private BlockModel captureMissingModel(ModelBakery bakery, ResourceLocation location) throws IOException {
this.missingModel = this.loadBlockModel(location); this.missingModel = this.method_4718(location);
this.blockStateFiles = new HashSet<>(); this.blockStateFiles = new HashSet<>();
this.modelFiles = new HashSet<>(); this.modelFiles = new HashSet<>();
return (BlockModel)this.missingModel; return (BlockModel)this.missingModel;