aboutsummaryrefslogtreecommitdiff
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
parente790717a6fbad39f8643683a64df988dbda9ecd5 (diff)
downloadCITResewn-4fdc32dcc39d744e7c539895740955b253530331.tar.gz
CITResewn-4fdc32dcc39d744e7c539895740955b253530331.tar.bz2
CITResewn-4fdc32dcc39d744e7c539895740955b253530331.zip
Ported to 1.18
-rw-r--r--build.gradle4
-rw-r--r--gradle.properties14
-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
5 files changed, 14 insertions, 14 deletions
diff --git a/build.gradle b/build.gradle
index 6d29cb2..68337a1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -46,8 +46,8 @@ loom {
accessWidenerPath = file("src/main/resources/citresewn.accesswidener")
}
-sourceCompatibility = JavaVersion.VERSION_16
-targetCompatibility = JavaVersion.VERSION_16
+sourceCompatibility = JavaVersion.VERSION_17
+targetCompatibility = JavaVersion.VERSION_17
java {
archivesBaseName = project.archives_base_name
diff --git a/gradle.properties b/gradle.properties
index 5456550..4ca97f4 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
-minecraft_version=1.17.1
-minecraft_version_compat=1.17.x
-yarn_mappings=1.17.1+build.39
+minecraft_version=1.18.1
+minecraft_version_compat=1.18.x
+yarn_mappings=1.18.1+build.14
loader_version=0.12.12
-fabric_api=0.39.2+1.17
-modmenu=2.0.6
-cloth=5.0.38
-cosmetic_armor=3419941
+fabric_api=0.45.0+1.18
+modmenu=3.0.1
+cloth=6.1.48
+cosmetic_armor=3544655
# Mod Properties
mod_version=0.8.2
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"
}
}