aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2022-01-10 17:39:17 +0200
committerSHsuperCM <shsupercm@gmail.com>2022-01-10 17:41:17 +0200
commit4fdc32dcc39d744e7c539895740955b253530331 (patch)
treed86a3e95acce71b8b1a4d5a4e64f508e8ab2fc6f /src/main
parente790717a6fbad39f8643683a64df988dbda9ecd5 (diff)
downloadCITResewn-4fdc32dcc39d744e7c539895740955b253530331.tar.gz
CITResewn-4fdc32dcc39d744e7c539895740955b253530331.tar.bz2
CITResewn-4fdc32dcc39d744e7c539895740955b253530331.zip
Ported to 1.18
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citenchantment/ItemRendererMixin.java6
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/mixin/cititem/ItemRendererMixin.java2
-rw-r--r--src/main/resources/fabric.mod.json2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citenchantment/ItemRendererMixin.java b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citenchantment/ItemRendererMixin.java
index eb9f714..13d91c7 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citenchantment/ItemRendererMixin.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citenchantment/ItemRendererMixin.java
@@ -20,7 +20,7 @@ import shcm.shsupercm.fabric.citresewn.pack.cits.CITEnchantment;
@Mixin(ItemRenderer.class)
public class ItemRendererMixin {
- @Inject(method = "getHeldItemModel", at = @At("TAIL"))
+ @Inject(method = "getModel", at = @At("TAIL"))
private void setAppliedContext(ItemStack stack, World world, LivingEntity entity, int seed, CallbackInfoReturnable<BakedModel> cir) {
if (CITResewnConfig.INSTANCE().enabled && CITResewn.INSTANCE.activeCITs != null)
CITResewn.INSTANCE.activeCITs.setEnchantmentAppliedContextCached(stack, world, entity);
@@ -54,7 +54,7 @@ public class ItemRendererMixin {
return;
VertexConsumer vertexConsumer = CITEnchantment.GlintRenderLayer.GLINT.tryApply(null, layer, provider);
if (vertexConsumer != null)
- cir.setReturnValue(VertexConsumers.union(new OverlayVertexConsumer(vertexConsumer, entry.getModel(), entry.getNormal()), cir.getReturnValue()));
+ cir.setReturnValue(VertexConsumers.union(new OverlayVertexConsumer(vertexConsumer, entry.getPositionMatrix(), entry.getNormalMatrix()), cir.getReturnValue()));
}
@Inject(method = "getDirectCompassGlintConsumer", cancellable = true, at = @At("RETURN"))
@@ -63,7 +63,7 @@ public class ItemRendererMixin {
return;
VertexConsumer vertexConsumer = CITEnchantment.GlintRenderLayer.DIRECT_GLINT.tryApply(null, layer, provider);
if (vertexConsumer != null)
- cir.setReturnValue(VertexConsumers.union(new OverlayVertexConsumer(vertexConsumer, entry.getModel(), entry.getNormal()), cir.getReturnValue()));
+ cir.setReturnValue(VertexConsumers.union(new OverlayVertexConsumer(vertexConsumer, entry.getPositionMatrix(), entry.getNormalMatrix()), cir.getReturnValue()));
}
@Inject(method = "getItemGlintConsumer", cancellable = true, at = @At("RETURN"))
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/cititem/ItemRendererMixin.java b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/cititem/ItemRendererMixin.java
index ae097ca..2cb5662 100644
--- a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/cititem/ItemRendererMixin.java
+++ b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/cititem/ItemRendererMixin.java
@@ -32,7 +32,7 @@ public class ItemRendererMixin {
private static WeakReference<BakedModel> mojankCITModel = null;
- @Inject(method = "getHeldItemModel", cancellable = true, at = @At("HEAD"))
+ @Inject(method = "getModel", cancellable = true, at = @At("HEAD"))
private void getItemModel(ItemStack stack, World world, LivingEntity entity, int seed, CallbackInfoReturnable<BakedModel> cir) {
if (!CITResewnConfig.INSTANCE().enabled || CITResewn.INSTANCE.activeCITs == null)
return;
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index 7adb761..3ab2b9b 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -26,6 +26,6 @@
"depends": {
"fabric": "*",
"fabricloader": "*",
- "minecraft": "1.17.x"
+ "minecraft": "1.18.x"
}
}