From df87bd36339b89dd7b2d61bbe0ed148d067fda99 Mon Sep 17 00:00:00 2001 From: StellarWind22 Date: Thu, 30 Nov 2023 13:26:33 -0600 Subject: [PATCH] Will start now textures broken --- build.gradle | 25 ------------------- gradle.properties | 3 +-- .../basicshields/util/ModShieldItem.java | 8 ++++++ 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/build.gradle b/build.gradle index 2db9b34..b4c0852 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,3 @@ -buildscript { - dependencies { - classpath "de.guntram.mcmod:crowdin-translate:${project.crowdlin_version}" - } - repositories { - maven { - name = 'CrowdinTranslate source' - url = "https://minecraft.guntram.de/maven/" - } - } -} - plugins { id 'fabric-loom' version '0.12-SNAPSHOT' id 'maven-publish' @@ -22,11 +10,6 @@ archivesBaseName = project.archives_base_name version = project.mod_version + "-${project.minecraft_version}" group = project.maven_group -apply plugin: 'de.guntram.mcmod.crowdin-translate' -crowdintranslate.crowdinProjectName = 'basic-shields' -crowdintranslate.minecraftProjectName = "basicshields" -crowdintranslate.verbose = false - repositories { maven {url = "https://minecraft.guntram.de/maven/"} maven { url = "https://jitpack.io" } @@ -54,10 +37,6 @@ dependencies { modCompileOnly modRuntimeOnly ("com.terraformersmc:modmenu:${project.mod_menu_version}"), { exclude(group: "net.fabricmc.fabric-api") } - - //Crowdlin - modImplementation "de.guntram.mcmod:crowdin-translate:${project.crowdlin_version}" - include "de.guntram.mcmod:crowdin-translate:${project.crowdlin_version}" } processResources { @@ -96,8 +75,4 @@ publishing { // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. repositories {} -} - -build { - dependsOn downloadTranslations } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 957c5b1..30805b4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,5 +16,4 @@ archives_base_name = BasicShields fabric_version=0.89.2+1.20.2 fabric_shield_lib_version=1.7.1-1.20.2 cloth_version=8.2.88 -mod_menu_version=7.1.0 -crowdlin_version=1.4+1.19 \ No newline at end of file +mod_menu_version=7.1.0 \ No newline at end of file diff --git a/src/main/java/com/github/crimsondawn45/basicshields/util/ModShieldItem.java b/src/main/java/com/github/crimsondawn45/basicshields/util/ModShieldItem.java index 882ef4b..a58dd08 100644 --- a/src/main/java/com/github/crimsondawn45/basicshields/util/ModShieldItem.java +++ b/src/main/java/com/github/crimsondawn45/basicshields/util/ModShieldItem.java @@ -5,6 +5,7 @@ import com.github.crimsondawn45.basicshields.initializers.BasicShields; import com.github.crimsondawn45.fabricshieldlib.initializers.FabricShieldLibClient; +import com.github.crimsondawn45.fabricshieldlib.lib.event.ShieldSetModelCallback; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; @@ -18,6 +19,7 @@ import net.minecraft.client.util.math.MatrixStack; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.ActionResult; import net.minecraft.util.Identifier; public class ModShieldItem extends ModItem { @@ -156,6 +158,12 @@ public ShieldEntityModel getShieldEntityModel() { @Environment(EnvType.CLIENT) public void RegisterModelLayer(){ EntityModelLayerRegistry.registerModelLayer(this.getEntityModelLayer(), ShieldEntityModel::getTexturedModelData); + + //Set model + ShieldSetModelCallback.EVENT.register((loader) -> { + this.shieldEntityModel = new ShieldEntityModel(loader.getModelPart(this.getEntityModelLayer())); + return ActionResult.PASS; + }); } /**