Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render altiora sheaf on fabric #726

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package at.petrak.hexcasting.fabric.mixin.client;

import at.petrak.hexcasting.client.model.AltioraLayer;
import net.minecraft.client.model.PlayerModel;
import net.minecraft.client.player.AbstractClientPlayer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.LivingEntityRenderer;
import net.minecraft.client.renderer.entity.player.PlayerRenderer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(PlayerRenderer.class)
public abstract class FabricPlayerRendererMixin extends LivingEntityRenderer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> {
public FabricPlayerRendererMixin(EntityRendererProvider.Context context, PlayerModel<AbstractClientPlayer> entityModel, float f) {
super(context, entityModel, f);
}

@Inject(method = "<init>", at = @At("TAIL"))
private void addAltiora(EntityRendererProvider.Context ctx, boolean bl, CallbackInfo ci) {
this.addLayer(new AltioraLayer<>((PlayerRenderer)(Object)this, ctx.getModelSet()));
}
}
3 changes: 2 additions & 1 deletion Fabric/src/main/resources/fabricasting.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"client.FabricMixinGameRenderer",
"client.FabricModelManagerMixin",
"client.FabricMouseHandlerMixin",
"client.FabricParticleEngineMixin"
"client.FabricParticleEngineMixin",
"client.FabricPlayerRendererMixin"
]
}
Loading