Hi I'm trying to create an item that shows a 3d render when in a players hand and is 2d in the inventory. However when the game loads one of the mixins is crashes.
This is the code for the mixin in question, not including the imports:
public abstract class ModelLoaderMixin {
@Shadow
protected abstract void addModel(ModelIdentifier modelIdentifier);
@Inject(method = "<init>", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/model/ModelLoader;addModel(Lnet/minecraft/client/util/ModelIdentifier;)V", ordinal = 3, shift = At.Shift.AFTER))
public void addEmptyJar(Map<Identifier, JsonUnbakedModel> jsonUnbakedModels, Map<Identifier, List<ModelLoader.SpriteGetter>> blockStates, CallbackInfo ci) {
this.addModel(new ModelIdentifier(Identifier.of(BoozinMod.MOD_ID, "empty_jar_3d"), "inventory"));
}
}```
This mixin is loaded along side ItemRendererMixin and ItemRendererAccessor, both of which seem to load correctly