-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from StellarWitch7/master
- Loading branch information
Showing
79 changed files
with
1,983 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/client/java/dev/enjarai/trickster/render/HoldableHatRenderer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package dev.enjarai.trickster.render; | ||
|
||
import io.wispforest.accessories.api.client.AccessoryRenderer; | ||
import io.wispforest.accessories.api.client.Side; | ||
import io.wispforest.accessories.api.slot.SlotReference; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.render.OverlayTexture; | ||
import net.minecraft.client.render.VertexConsumerProvider; | ||
import net.minecraft.client.render.entity.model.BipedEntityModel; | ||
import net.minecraft.client.render.entity.model.EntityModel; | ||
import net.minecraft.client.render.model.json.ModelTransformationMode; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import net.minecraft.entity.LivingEntity; | ||
import net.minecraft.item.ItemStack; | ||
|
||
public class HoldableHatRenderer implements AccessoryRenderer { | ||
@Override | ||
public <M extends LivingEntity> void render(ItemStack stack, SlotReference reference, MatrixStack matrices, EntityModel<M> model, VertexConsumerProvider multiBufferSource, int light, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) { | ||
if (!(model instanceof BipedEntityModel<? extends LivingEntity> humanoidModel)) return; | ||
|
||
AccessoryRenderer.transformToFace(matrices, humanoidModel.head, Side.TOP); | ||
matrices.translate(0.0, -0.3, 0.0); | ||
|
||
MinecraftClient.getInstance().getItemRenderer().renderItem( | ||
stack, ModelTransformationMode.HEAD, light, OverlayTexture.DEFAULT_UV, | ||
matrices, multiBufferSource, reference.entity().getWorld(), 0 | ||
); | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
src/main/generated/.cache/27614340de28b382d5f7ae74366bcf39e2ac3aeb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// 1.21 2024-07-15T21:34:42.9793041 Trickster/Model Definitions | ||
b9b893ec0a8cd31d7398651d871e15a392ea76b2 assets\trickster\models\item\spell_resonator.json | ||
9d5d343103d621d1a2f492cec156c06274efdc15 assets\trickster\blockstates\spell_resonator.json |
Oops, something went wrong.