From ae31eb7a9bb0e3b073124298f944afc67e8d7bf3 Mon Sep 17 00:00:00 2001 From: enjarai Date: Wed, 29 May 2024 23:13:21 +0200 Subject: [PATCH] Publish teim :D --- CHANGELOG.md | 5 +- build.gradle | 6 ++ gradle.properties | 2 +- .../ed966a455c4849743f9bad7f661ea201bfb98470 | 5 +- .../models/item/blahaj_skins/shark_shark.json | 6 ++ .../models/item/totem_of_undying.json | 78 ++++++++++-------- .../dev/enjarai/blahajtotem/BlahajFlags.java | 29 +++++++ .../dev/enjarai/blahajtotem/BlahajTotem.java | 42 +++++++++- .../dev/enjarai/blahajtotem/BlahajType.java | 10 ++- .../blahajtotem/ShorkModelGenerator.java | 2 +- .../mixin/BipedEntityModelMixin.java | 3 +- .../mixin/PlayerEntityRendererMixin.java | 3 +- .../assets/blahaj_totem/lang/en_us.yml | 5 ++ .../blahaj_totem/models/item/shork.json | 2 +- .../models/item/totem_parent.json | 3 + .../assets/blahaj_totem/models/item/whal.json | 2 +- .../shark_shark.png} | Bin .../item/blahaj_skins/trans_shark.png | Bin 1136 -> 1131 bytes .../assets/minecraft/lang/is_is.json | 3 - .../assets/minecraft/lang/nl_nl.json | 3 - .../assets/minecraft/lang/sv_se.json | 3 - .../assets/blahaj_totem/default_to_totem | 0 .../models/item/totem_parent.json | 6 ++ .../assets/minecraft/lang/en_us.json | 3 + .../default_to_totem/pack.mcmeta | 7 ++ .../resourcepacks/default_to_totem/pack.png | Bin 0 -> 258 bytes 26 files changed, 166 insertions(+), 62 deletions(-) create mode 100644 src/main/generated/assets/blahaj_totem/models/item/blahaj_skins/shark_shark.json create mode 100644 src/main/java/dev/enjarai/blahajtotem/BlahajFlags.java create mode 100644 src/main/resources/assets/blahaj_totem/lang/en_us.yml create mode 100644 src/main/resources/assets/blahaj_totem/models/item/totem_parent.json rename src/main/resources/assets/blahaj_totem/textures/item/{shork.png => blahaj_skins/shark_shark.png} (100%) delete mode 100644 src/main/resources/assets/minecraft/lang/is_is.json delete mode 100644 src/main/resources/assets/minecraft/lang/nl_nl.json delete mode 100644 src/main/resources/assets/minecraft/lang/sv_se.json create mode 100644 src/main/resources/resourcepacks/default_to_totem/assets/blahaj_totem/default_to_totem create mode 100644 src/main/resources/resourcepacks/default_to_totem/assets/blahaj_totem/models/item/totem_parent.json create mode 100644 src/main/resources/resourcepacks/default_to_totem/assets/minecraft/lang/en_us.json create mode 100644 src/main/resources/resourcepacks/default_to_totem/pack.mcmeta create mode 100644 src/main/resources/resourcepacks/default_to_totem/pack.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c1c003..67e4b82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,2 @@ -- Added `whale` shark variant, turning your shark into our also beloved Blåvingad. -- Added `prider` shark texture, similar to the `pride` shark, but with just a tad more representation. -- Tweaked `trans` shark texture to be more in line with other pride textures. \ No newline at end of file +- Added the option to not have Totems be Blåhaj by default as a builtin resource pack. +- Fixed a mistake in the updated `trans` shark texture. \ No newline at end of file diff --git a/build.gradle b/build.gradle index 0b14fce..7d0ea89 100644 --- a/build.gradle +++ b/build.gradle @@ -2,6 +2,7 @@ plugins { id 'fabric-loom' version '1.6-SNAPSHOT' id 'maven-publish' id "me.modmuss50.mod-publish-plugin" version "0.4.4" + id 'me.fallenbreath.yamlang' version '1.3.1' } version = project.mod_version @@ -81,6 +82,11 @@ loom { } } +yamlang { + targetSourceSets = [sourceSets.main] + inputDir = "assets/blahaj_totem/lang" +} + // configure the maven publication publishing { publications { diff --git a/gradle.properties b/gradle.properties index 30ec0d6..77bac15 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.20.6+build.1 loader_version=0.15.11 # Mod Properties -mod_version=1.4.0 +mod_version=1.4.1 maven_group=dev.enjarai.blahajtotem archives_base_name=blahaj-totem diff --git a/src/main/generated/.cache/ed966a455c4849743f9bad7f661ea201bfb98470 b/src/main/generated/.cache/ed966a455c4849743f9bad7f661ea201bfb98470 index bd60242..d5e798a 100644 --- a/src/main/generated/.cache/ed966a455c4849743f9bad7f661ea201bfb98470 +++ b/src/main/generated/.cache/ed966a455c4849743f9bad7f661ea201bfb98470 @@ -1,8 +1,8 @@ -// 1.20.6 2024-05-29T15:02:22.831031 Blåhaj of Undying/Model Definitions +// 1.20.6 2024-05-29T20:05:30.6926358 Blåhaj of Undying/Model Definitions 0328344f7ee0d0d51f6710182c2f66d9ab0e7f8e assets\blahaj_totem\models\item\blahaj_skins\demiboy_shark.json 1cc7cdb3a189ebb3e5672fffda5973b9157cf3bf assets\blahaj_totem\models\item\blahaj_skins\trans_shark.json d4c40cb9fad911fa329d304d157868a6db6041b1 assets\blahaj_totem\models\item\blahaj_skins\demiromantic_shark.json -1a043225708ea5537309702ab3bd88b9237a260c assets\minecraft\models\item\totem_of_undying.json +9cf0d07ded165bf4716cdd59415bbd0702dd118f assets\minecraft\models\item\totem_of_undying.json 6480899a119dce40aa3ad47fb28bdc0d776fecc6 assets\blahaj_totem\models\item\blahaj_skins\magenta_shark.json 42e40aaa4c4076f056e6f1d335893b1efe468a52 assets\blahaj_totem\models\item\blahaj_skins\whale_shark.json 3320dab9f7381073b86bc884982a0a51347ed292 assets\blahaj_totem\models\item\blahaj_skins\pan_shark.json @@ -17,6 +17,7 @@ bf489d5e2929f52ad1dec25edefd1fdda7f955a7 assets\blahaj_totem\models\item\blahaj_ a8de69ca6c876689359cbed8b42a384a6f63c224 assets\blahaj_totem\models\item\blahaj_skins\green_shark.json 192702d5390c09cb9af1390dca41fc0ea121958c assets\blahaj_totem\models\item\blahaj_skins\poly_shark.json efabfd6745bad86afffa209bbec813826aa9be89 assets\blahaj_totem\models\item\blahaj_skins\greysexual_shark.json +66c84faba233e260701c30dfcee8e48f1be16e5d assets\blahaj_totem\models\item\blahaj_skins\shark_shark.json 9e21b53bd3d59b73dba0e3b91a8a0ed0aecea18d assets\blahaj_totem\models\item\blahaj_skins\genderqueer_shark.json ffd66a20bc178b92924684ad486c3c14d08d52ad assets\blahaj_totem\models\item\blahaj_skins\purple_shark.json b079fbf97350d849937bd25c0569abe5f2db6938 assets\blahaj_totem\models\item\blahaj_skins\lesbian_shark.json diff --git a/src/main/generated/assets/blahaj_totem/models/item/blahaj_skins/shark_shark.json b/src/main/generated/assets/blahaj_totem/models/item/blahaj_skins/shark_shark.json new file mode 100644 index 0000000..d39152e --- /dev/null +++ b/src/main/generated/assets/blahaj_totem/models/item/blahaj_skins/shark_shark.json @@ -0,0 +1,6 @@ +{ + "parent": "blahaj_totem:item/shork", + "textures": { + "0": "blahaj_totem:item/blahaj_skins/shark_shark" + } +} \ No newline at end of file diff --git a/src/main/generated/assets/minecraft/models/item/totem_of_undying.json b/src/main/generated/assets/minecraft/models/item/totem_of_undying.json index 60cb358..b509201 100644 --- a/src/main/generated/assets/minecraft/models/item/totem_of_undying.json +++ b/src/main/generated/assets/minecraft/models/item/totem_of_undying.json @@ -1,218 +1,224 @@ { - "parent": "blahaj_totem:item/shork", + "parent": "blahaj_totem:item/totem_parent", "overrides": [ { "model": "blahaj_totem:item/blahaj_skins/gray_shark", "predicate": { - "blahaj_totem:shork_variant": 0.027777778 + "blahaj_totem:shork_variant": 0.027027028 } }, { "model": "blahaj_totem:item/blahaj_skins/grey_shark", "predicate": { - "blahaj_totem:shork_variant": 0.055555556 + "blahaj_totem:shork_variant": 0.054054055 } }, { "model": "blahaj_totem:item/blahaj_skins/red_shark", "predicate": { - "blahaj_totem:shork_variant": 0.083333336 + "blahaj_totem:shork_variant": 0.08108108 } }, { "model": "blahaj_totem:item/blahaj_skins/orange_shark", "predicate": { - "blahaj_totem:shork_variant": 0.11111111 + "blahaj_totem:shork_variant": 0.10810811 } }, { "model": "blahaj_totem:item/blahaj_skins/yellow_shark", "predicate": { - "blahaj_totem:shork_variant": 0.1388889 + "blahaj_totem:shork_variant": 0.13513513 } }, { "model": "blahaj_totem:item/blahaj_skins/lime_shark", "predicate": { - "blahaj_totem:shork_variant": 0.16666667 + "blahaj_totem:shork_variant": 0.16216215 } }, { "model": "blahaj_totem:item/blahaj_skins/green_shark", "predicate": { - "blahaj_totem:shork_variant": 0.19444445 + "blahaj_totem:shork_variant": 0.1891892 } }, { "model": "blahaj_totem:item/blahaj_skins/cyan_shark", "predicate": { - "blahaj_totem:shork_variant": 0.22222222 + "blahaj_totem:shork_variant": 0.21621622 } }, { "model": "blahaj_totem:item/blahaj_skins/blue_shark", "predicate": { - "blahaj_totem:shork_variant": 0.25 + "blahaj_totem:shork_variant": 0.24324325 } }, { "model": "blahaj_totem:item/blahaj_skins/purple_shark", "predicate": { - "blahaj_totem:shork_variant": 0.2777778 + "blahaj_totem:shork_variant": 0.27027026 } }, { "model": "blahaj_totem:item/blahaj_skins/magenta_shark", "predicate": { - "blahaj_totem:shork_variant": 0.30555555 + "blahaj_totem:shork_variant": 0.2972973 } }, { "model": "blahaj_totem:item/blahaj_skins/pink_shark", "predicate": { - "blahaj_totem:shork_variant": 0.33333334 + "blahaj_totem:shork_variant": 0.3243243 } }, { "model": "blahaj_totem:item/blahaj_skins/ace_shark", "predicate": { - "blahaj_totem:shork_variant": 0.3611111 + "blahaj_totem:shork_variant": 0.35135135 } }, { "model": "blahaj_totem:item/blahaj_skins/agender_shark", "predicate": { - "blahaj_totem:shork_variant": 0.3888889 + "blahaj_totem:shork_variant": 0.3783784 } }, { "model": "blahaj_totem:item/blahaj_skins/aro_shark", "predicate": { - "blahaj_totem:shork_variant": 0.41666666 + "blahaj_totem:shork_variant": 0.4054054 } }, { "model": "blahaj_totem:item/blahaj_skins/aroace_shark", "predicate": { - "blahaj_totem:shork_variant": 0.44444445 + "blahaj_totem:shork_variant": 0.43243244 } }, { "model": "blahaj_totem:item/blahaj_skins/bi_shark", "predicate": { - "blahaj_totem:shork_variant": 0.4722222 + "blahaj_totem:shork_variant": 0.45945945 } }, { "model": "blahaj_totem:item/blahaj_skins/demiboy_shark", "predicate": { - "blahaj_totem:shork_variant": 0.5 + "blahaj_totem:shork_variant": 0.4864865 } }, { "model": "blahaj_totem:item/blahaj_skins/demigirl_shark", "predicate": { - "blahaj_totem:shork_variant": 0.5277778 + "blahaj_totem:shork_variant": 0.5135135 } }, { "model": "blahaj_totem:item/blahaj_skins/demiromantic_shark", "predicate": { - "blahaj_totem:shork_variant": 0.5555556 + "blahaj_totem:shork_variant": 0.5405405 } }, { "model": "blahaj_totem:item/blahaj_skins/demisexual_shark", "predicate": { - "blahaj_totem:shork_variant": 0.5833333 + "blahaj_totem:shork_variant": 0.5675676 } }, { "model": "blahaj_totem:item/blahaj_skins/enby_shark", "predicate": { - "blahaj_totem:shork_variant": 0.6111111 + "blahaj_totem:shork_variant": 0.5945946 } }, { "model": "blahaj_totem:item/blahaj_skins/gay_shark", "predicate": { - "blahaj_totem:shork_variant": 0.6388889 + "blahaj_totem:shork_variant": 0.6216216 } }, { "model": "blahaj_totem:item/blahaj_skins/genderfluid_shark", "predicate": { - "blahaj_totem:shork_variant": 0.6666667 + "blahaj_totem:shork_variant": 0.6486486 } }, { "model": "blahaj_totem:item/blahaj_skins/genderqueer_shark", "predicate": { - "blahaj_totem:shork_variant": 0.6944444 + "blahaj_totem:shork_variant": 0.6756757 } }, { "model": "blahaj_totem:item/blahaj_skins/greyromantic_shark", "predicate": { - "blahaj_totem:shork_variant": 0.7222222 + "blahaj_totem:shork_variant": 0.7027027 } }, { "model": "blahaj_totem:item/blahaj_skins/greyrose_shark", "predicate": { - "blahaj_totem:shork_variant": 0.75 + "blahaj_totem:shork_variant": 0.7297297 } }, { "model": "blahaj_totem:item/blahaj_skins/greysexual_shark", "predicate": { - "blahaj_totem:shork_variant": 0.7777778 + "blahaj_totem:shork_variant": 0.7567568 } }, { "model": "blahaj_totem:item/blahaj_skins/intersex_shark", "predicate": { - "blahaj_totem:shork_variant": 0.8055556 + "blahaj_totem:shork_variant": 0.7837838 } }, { "model": "blahaj_totem:item/blahaj_skins/lesbian_shark", "predicate": { - "blahaj_totem:shork_variant": 0.8333333 + "blahaj_totem:shork_variant": 0.8108108 } }, { "model": "blahaj_totem:item/blahaj_skins/pan_shark", "predicate": { - "blahaj_totem:shork_variant": 0.8611111 + "blahaj_totem:shork_variant": 0.8378378 } }, { "model": "blahaj_totem:item/blahaj_skins/poly_shark", "predicate": { - "blahaj_totem:shork_variant": 0.8888889 + "blahaj_totem:shork_variant": 0.8648649 } }, { "model": "blahaj_totem:item/blahaj_skins/pride_shark", "predicate": { - "blahaj_totem:shork_variant": 0.9166667 + "blahaj_totem:shork_variant": 0.8918919 } }, { "model": "blahaj_totem:item/blahaj_skins/prider_shark", "predicate": { - "blahaj_totem:shork_variant": 0.9444444 + "blahaj_totem:shork_variant": 0.9189189 } }, { "model": "blahaj_totem:item/blahaj_skins/trans_shark", "predicate": { - "blahaj_totem:shork_variant": 0.9722222 + "blahaj_totem:shork_variant": 0.9459459 } }, { "model": "blahaj_totem:item/blahaj_skins/whale_shark", + "predicate": { + "blahaj_totem:shork_variant": 0.972973 + } + }, + { + "model": "blahaj_totem:item/blahaj_skins/shark_shark", "predicate": { "blahaj_totem:shork_variant": 1.0 } diff --git a/src/main/java/dev/enjarai/blahajtotem/BlahajFlags.java b/src/main/java/dev/enjarai/blahajtotem/BlahajFlags.java new file mode 100644 index 0000000..90a88ba --- /dev/null +++ b/src/main/java/dev/enjarai/blahajtotem/BlahajFlags.java @@ -0,0 +1,29 @@ +package dev.enjarai.blahajtotem; + +import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener; +import net.fabricmc.fabric.api.resource.SimpleSynchronousResourceReloadListener; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.resource.ResourceManager; +import net.minecraft.util.Identifier; + +public class BlahajFlags implements IdentifiableResourceReloadListener, SimpleSynchronousResourceReloadListener { + public static boolean defaultToTotem = false; + + public static boolean isBlahaj(ItemStack itemStack) { + if (itemStack.isOf(Items.TOTEM_OF_UNDYING)) { + return !BlahajFlags.defaultToTotem || BlahajTotem.getShorkType(itemStack) != null; + } + return false; + } + + @Override + public Identifier getFabricId() { + return BlahajTotem.id("flags"); + } + + @Override + public void reload(ResourceManager manager) { + defaultToTotem = manager.getResource(BlahajTotem.id("default_to_totem")).isPresent(); + } +} diff --git a/src/main/java/dev/enjarai/blahajtotem/BlahajTotem.java b/src/main/java/dev/enjarai/blahajtotem/BlahajTotem.java index 5c56245..674e3e7 100644 --- a/src/main/java/dev/enjarai/blahajtotem/BlahajTotem.java +++ b/src/main/java/dev/enjarai/blahajtotem/BlahajTotem.java @@ -1,19 +1,27 @@ package dev.enjarai.blahajtotem; +import com.mojang.datafixers.util.Pair; import dev.enjarai.blahajtotem.particle.ModParticles; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; +import net.fabricmc.fabric.api.resource.ResourceManagerHelper; +import net.fabricmc.fabric.api.resource.ResourcePackActivationType; +import net.fabricmc.loader.api.FabricLoader; import net.minecraft.client.item.ModelPredicateProviderRegistry; import net.minecraft.component.DataComponentTypes; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; +import net.minecraft.resource.ResourceType; +import net.minecraft.text.Text; import net.minecraft.util.Identifier; import org.jetbrains.annotations.Nullable; import java.util.Arrays; +import java.util.LinkedList; import java.util.List; import java.util.Locale; +import java.util.stream.Stream; public class BlahajTotem implements ClientModInitializer, DataGeneratorEntrypoint { public static final String MOD_ID = "blahaj-totem"; @@ -57,7 +65,11 @@ public class BlahajTotem implements ClientModInitializer, DataGeneratorEntrypoin new BlahajType("prider", 0xde585b, 0xf07f5d, 0xe4bd5c, 0x96df5e, 0x6261a1, 0x704c9e, 0x6f9fba, 0xe882b6, 0xc6d3d6), new BlahajType("trans", 0x6f9fba, 0xe882b6, 0xc6d3d6), - new BlahajType("whale", BlahajTotem.id("item/whal"), 0x39508e, 0x546bb3, 0xc3d0d3) + new BlahajType("whale", List.of("blavingad", "blåvingad"), BlahajTotem.id("item/whal"), 0x39508e, 0x546bb3, 0xc3d0d3), + new BlahajType("shark", List.of( // Can't have enough options :D + "blahaj", "blåhaj", "shork", "shonk", "sharky", "sharkie", "haj", "haai", "hai", + "biter", "chomper", "chompy", "muncher", "megalodon", "meg", "meggy", "gawr", "finn" + ), 0x56839d, 0x74a4bf, 0xc3d0d3) ); @Override @@ -70,6 +82,12 @@ public void onInitializeClient() { return 0f; }); + ResourceManagerHelper.get(ResourceType.CLIENT_RESOURCES).registerReloadListener(new BlahajFlags()); + ResourceManagerHelper.registerBuiltinResourcePack( + BlahajTotem.id("default_to_totem"), FabricLoader.getInstance().getModContainer(MOD_ID).orElseThrow(), + Text.translatable("blahaj_totem.resourcepack.default_to_totem"), ResourcePackActivationType.NORMAL + ); + ModParticles.register(); } @@ -78,19 +96,35 @@ public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) { fabricDataGenerator.createPack().addProvider(ShorkModelGenerator::new); } + public static final LinkedList> SEARCHABLE_VARIANTS = new LinkedList<>(VARIANTS.stream() + .flatMap(type -> Stream.concat( + Stream.of(Pair.of(type.name(), type)), + type.alternatives().stream().map(alt -> Pair.of(alt, type)) + )) + .toList()); + @Nullable public static BlahajType getShorkType(ItemStack stack) { if (stack.isOf(Items.TOTEM_OF_UNDYING) && stack.contains(DataComponentTypes.CUSTOM_NAME)) { var name = Arrays.asList(stack.getName().getString().toLowerCase(Locale.ROOT).split("[ \\-_]")); - var variant = VARIANTS.stream().filter(v -> name.contains(v.name())).reduce((v1, v2) -> v2.name().length() > v1.name().length() ? v2 : v1); + Pair type = null; + + for (var variant : SEARCHABLE_VARIANTS) { + var vName = variant.getFirst(); + if (name.contains(vName) && (type == null || vName.length() > type.getFirst().length())) { + type = variant; + } + } - return variant.orElse(null); + if (type != null) { + return type.getSecond(); + } } return null; } public static Identifier id(String path) { - return new Identifier(NAMESPACE, path); + return Identifier.of(NAMESPACE, path); } } diff --git a/src/main/java/dev/enjarai/blahajtotem/BlahajType.java b/src/main/java/dev/enjarai/blahajtotem/BlahajType.java index 68ace42..dc191e5 100644 --- a/src/main/java/dev/enjarai/blahajtotem/BlahajType.java +++ b/src/main/java/dev/enjarai/blahajtotem/BlahajType.java @@ -2,8 +2,14 @@ import net.minecraft.util.Identifier; -public record BlahajType(String name, Identifier model, int... colors) { +import java.util.List; + +public record BlahajType(String name, List alternatives, Identifier model, int... colors) { public BlahajType(String name, int... colors) { - this(name, BlahajTotem.id("item/shork"), colors); + this(name, List.of(), BlahajTotem.id("item/shork"), colors); + } + + public BlahajType(String name, List alternatives, int... colors) { + this(name, alternatives, BlahajTotem.id("item/shork"), colors); } } diff --git a/src/main/java/dev/enjarai/blahajtotem/ShorkModelGenerator.java b/src/main/java/dev/enjarai/blahajtotem/ShorkModelGenerator.java index 6372ef1..1369a37 100644 --- a/src/main/java/dev/enjarai/blahajtotem/ShorkModelGenerator.java +++ b/src/main/java/dev/enjarai/blahajtotem/ShorkModelGenerator.java @@ -23,7 +23,7 @@ public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGen public void generateItemModels(ItemModelGenerator itemModelGenerator) { itemModelGenerator.writer.accept(ModelIds.getItemModelId(Items.TOTEM_OF_UNDYING), () -> { var model = new JsonObject(); - model.addProperty("parent", BlahajTotem.id("item/shork").toString()); + model.addProperty("parent", BlahajTotem.id("item/totem_parent").toString()); var overrides = new JsonArray(); for (int i = 0; i < BlahajTotem.VARIANTS.size(); i++) { diff --git a/src/main/java/dev/enjarai/blahajtotem/mixin/BipedEntityModelMixin.java b/src/main/java/dev/enjarai/blahajtotem/mixin/BipedEntityModelMixin.java index a842d83..893130c 100644 --- a/src/main/java/dev/enjarai/blahajtotem/mixin/BipedEntityModelMixin.java +++ b/src/main/java/dev/enjarai/blahajtotem/mixin/BipedEntityModelMixin.java @@ -1,5 +1,6 @@ package dev.enjarai.blahajtotem.mixin; +import dev.enjarai.blahajtotem.BlahajFlags; import net.minecraft.client.model.ModelPart; import net.minecraft.client.render.entity.model.BipedEntityModel; import net.minecraft.entity.LivingEntity; @@ -30,7 +31,7 @@ public class BipedEntityModelMixin { cancellable = true ) public void poseArms(LivingEntity entity, CallbackInfo ci) { - if(entity.getMainHandStack().isOf(Items.TOTEM_OF_UNDYING) || entity.getOffHandStack().isOf(Items.TOTEM_OF_UNDYING)) { + if(BlahajFlags.isBlahaj(entity.getMainHandStack()) || BlahajFlags.isBlahaj(entity.getOffHandStack())) { this.rightArm.pitch = -0.95F; this.rightArm.yaw = (float) (-Math.PI / 8); this.leftArm.pitch = -0.90F; diff --git a/src/main/java/dev/enjarai/blahajtotem/mixin/PlayerEntityRendererMixin.java b/src/main/java/dev/enjarai/blahajtotem/mixin/PlayerEntityRendererMixin.java index 9fa9ae3..f0e9af1 100644 --- a/src/main/java/dev/enjarai/blahajtotem/mixin/PlayerEntityRendererMixin.java +++ b/src/main/java/dev/enjarai/blahajtotem/mixin/PlayerEntityRendererMixin.java @@ -1,5 +1,6 @@ package dev.enjarai.blahajtotem.mixin; +import dev.enjarai.blahajtotem.BlahajFlags; import net.minecraft.client.network.AbstractClientPlayerEntity; import net.minecraft.client.render.entity.PlayerEntityRenderer; import net.minecraft.client.render.entity.model.BipedEntityModel; @@ -20,7 +21,7 @@ public class PlayerEntityRendererMixin { ) private static void cuddleBlahaj(AbstractClientPlayerEntity player, Hand hand, CallbackInfoReturnable ci) { ItemStack lv = player.getStackInHand(hand); - if(lv.isOf(Items.TOTEM_OF_UNDYING)) { + if (BlahajFlags.isBlahaj(lv)) { ci.setReturnValue(BipedEntityModel.ArmPose.CROSSBOW_HOLD); ci.cancel(); } diff --git a/src/main/resources/assets/blahaj_totem/lang/en_us.yml b/src/main/resources/assets/blahaj_totem/lang/en_us.yml new file mode 100644 index 0000000..6bfeaea --- /dev/null +++ b/src/main/resources/assets/blahaj_totem/lang/en_us.yml @@ -0,0 +1,5 @@ +blahaj_totem: + resourcepack: + default_to_totem: + .: Default to Totem + description: No more Blåhaj by default \ No newline at end of file diff --git a/src/main/resources/assets/blahaj_totem/models/item/shork.json b/src/main/resources/assets/blahaj_totem/models/item/shork.json index 513cdb6..a2740af 100644 --- a/src/main/resources/assets/blahaj_totem/models/item/shork.json +++ b/src/main/resources/assets/blahaj_totem/models/item/shork.json @@ -1,7 +1,7 @@ { "texture_size": [32, 32], "textures": { - "0": "blahaj_totem:item/shork", + "0": "blahaj_totem:item/blahaj_skins/shark_shark", "particle": "#0" }, "elements": [ diff --git a/src/main/resources/assets/blahaj_totem/models/item/totem_parent.json b/src/main/resources/assets/blahaj_totem/models/item/totem_parent.json new file mode 100644 index 0000000..63088a1 --- /dev/null +++ b/src/main/resources/assets/blahaj_totem/models/item/totem_parent.json @@ -0,0 +1,3 @@ +{ + "parent": "blahaj_totem:item/shork" +} \ No newline at end of file diff --git a/src/main/resources/assets/blahaj_totem/models/item/whal.json b/src/main/resources/assets/blahaj_totem/models/item/whal.json index b0c731d..3976127 100644 --- a/src/main/resources/assets/blahaj_totem/models/item/whal.json +++ b/src/main/resources/assets/blahaj_totem/models/item/whal.json @@ -2,7 +2,7 @@ "credit": "Made with Blockbench", "texture_size": [32, 32], "textures": { - "0": "blahaj_totem:item/whale", + "0": "blahaj_totem:item/blahaj_skins/whale_shark", "particle": "#0" }, "elements": [ diff --git a/src/main/resources/assets/blahaj_totem/textures/item/shork.png b/src/main/resources/assets/blahaj_totem/textures/item/blahaj_skins/shark_shark.png similarity index 100% rename from src/main/resources/assets/blahaj_totem/textures/item/shork.png rename to src/main/resources/assets/blahaj_totem/textures/item/blahaj_skins/shark_shark.png diff --git a/src/main/resources/assets/blahaj_totem/textures/item/blahaj_skins/trans_shark.png b/src/main/resources/assets/blahaj_totem/textures/item/blahaj_skins/trans_shark.png index 51f934b8cde84e7792dad10fc5d5e0e28a5097e1..e19dde560e42d570c4fd7e144734bc0e7e998440 100644 GIT binary patch delta 1097 zcmV-P1h)I|2%Akz!yFOKS1CIrKDN#$mE>$g@9BFdk5}=R0_nL z?%sij(z!MUeSbdV761n23`(UEC!%OeasXhdWa_z83Q|cpxl?jx7^Tv=R2rerAR;sx z4GbThwZ8CE8;QMSJu*3GmIT0^GZC*+RIp}$gvED#V8Oh^8#4fl;3 z@06cNeKK%acZ@6nugq!OM`yY7>2TzaU`;%Y64+78tA>L@h z4+6+`I~}9`3XC#1czP5|)3t()eIP+F%B24+^iY6F5Qqs{X%G`g5SFHEXf_)7mF|n$1^d@iRgm={xZ6e?6SN7zM7UNc>s$^D4Gr~t`Rv#!>kA+6R0qJ!c;S;H zIcL7CU9?xP-@x(lu`QEwWo4!Gd0%#MZeqbMe{{jRwb2?Fd# zO}mYQ7JK!C2zLcJ6GVq2Y=kE;RZztP#3h&tbC7W%T4rP}T z0O^5LY|mE~Kit&0US-H99vn>N*IGkq4Z#dmaKJr_!Z6pCUAV6NlkFqZh+NZ=O6G38 z@4a>8Uy;410&bF(R;pz8Zu~Fd9h<*ovv)xf0>qpfov=;-03d6h^`_iwtY?BoA>Uy zx7WqIna-OxFF!^XLch)ZnVIvQ`OeS1UVnc-0AOfh&Q)*Tz<&>4edG;K%{wiEYoAPd z05EuR)>&f!0K|;pXAgmiV5|ib;f+_0duU;3V$NyN*r?tD0Q`7y)&qdGwKWu>Cz<$4 z-F4)46$vo_SYx0Y4d_M#)|fVOV{My3Un%&?N8kqt{GgCD3m%%7bG}m0BG}*e5VQ!0 zIsN+tM3l~rwSVaG8Fv6MsLh}jiJd5wwj~Du)}m9-wFtCmByy+Z%&;QqT#G^IGl&Sa zS`C9IXPvM7)JAMCUJp&oxhSe*kQob;FL}s;tufH4_c3`wmY}y>fzA;S5o}BTtc~QI zWQ?LZtO#_YQLKO!NeL5jn~Q6rOyXo%2~#J+N(d{0Qh%w8LN#0VvLS49;QI?_J7l>u zI_f6J#+?eiO3*mL6o{zJptTlJR7a^)?g*u|7RDMFYw|Pz0Pm-n8An85A~dze z%ZrO04h>JuyX^Yda|hd=zxLt_9pB{9tqi${a69aTaHsIjoL_d?q|u_`D<42C`DVR_ zY=&#maeq=~-pwaoe$=81D*ym^{DA}b?U!G1-@X!VZwL-Oei%p3jo`a8U&0RpP#+=M ztiuli=w>q=OTA@Su{e5e1k2M)IU5H+ieSa2-z;=dfJqUE2}TTv38V8_{MRQLA(IZhsL1UVowo-eU*hnBf_Nb?$+fJFs2_ zM1;3Sju%Sz`O;tR#=w})IxYo1%Hj40 z&VN?m{DzggauGAEG1z!!A55-213=)bJ&~slEKPit9=p|Q6<1C#I%dW~bsZXj5do{c zlXZ2V6o#q9iW$rtms_iyCTISq7ru6^6cjT`LEI}I?t2iIzP;w6W-C-87<>KI9XG1j zfmTf?HJj9M(r}WChZci!fsrhEz0usg0)I!|FD|ts@60$~sg!&t*}hwNr{=G^Y|Bhg zbSVMii$=Z$YtgvA_`#OWbt^-jdbB^4-xvci28tPyb0FC(g<)G;PQrElpZq>DjVNh4 zT6Ej3_uV&7{426|RUnyUrPUJueKP)+@J`KNb=kWhDFtF~JCd~sR?fe-CndTnFh_p> zBWdidF(Br&7XV1(y|NefEx>;~8N!Ib*!a5bD+Uv#oiFZ!A)3wI)%QKz!~X_<1H?vp Un|>)#*Z=?k07*qoM6N<$g2Lzy-2eap diff --git a/src/main/resources/assets/minecraft/lang/is_is.json b/src/main/resources/assets/minecraft/lang/is_is.json deleted file mode 100644 index 90f165b..0000000 --- a/src/main/resources/assets/minecraft/lang/is_is.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "item.minecraft.totem_of_undying": "Blåhaj af ódauðleika" -} diff --git a/src/main/resources/assets/minecraft/lang/nl_nl.json b/src/main/resources/assets/minecraft/lang/nl_nl.json deleted file mode 100644 index 4bba4bc..0000000 --- a/src/main/resources/assets/minecraft/lang/nl_nl.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "item.minecraft.totem_of_undying": "Blåhaj der onsterfelijkheid" -} diff --git a/src/main/resources/assets/minecraft/lang/sv_se.json b/src/main/resources/assets/minecraft/lang/sv_se.json deleted file mode 100644 index 73bd1af..0000000 --- a/src/main/resources/assets/minecraft/lang/sv_se.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "item.minecraft.totem_of_undying": "Blåhaj av odödlighet" -} diff --git a/src/main/resources/resourcepacks/default_to_totem/assets/blahaj_totem/default_to_totem b/src/main/resources/resourcepacks/default_to_totem/assets/blahaj_totem/default_to_totem new file mode 100644 index 0000000..e69de29 diff --git a/src/main/resources/resourcepacks/default_to_totem/assets/blahaj_totem/models/item/totem_parent.json b/src/main/resources/resourcepacks/default_to_totem/assets/blahaj_totem/models/item/totem_parent.json new file mode 100644 index 0000000..abefc05 --- /dev/null +++ b/src/main/resources/resourcepacks/default_to_totem/assets/blahaj_totem/models/item/totem_parent.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/totem_of_undying" + } +} \ No newline at end of file diff --git a/src/main/resources/resourcepacks/default_to_totem/assets/minecraft/lang/en_us.json b/src/main/resources/resourcepacks/default_to_totem/assets/minecraft/lang/en_us.json new file mode 100644 index 0000000..6c2db49 --- /dev/null +++ b/src/main/resources/resourcepacks/default_to_totem/assets/minecraft/lang/en_us.json @@ -0,0 +1,3 @@ +{ + "item.minecraft.totem_of_undying": "Totem of Undying" +} \ No newline at end of file diff --git a/src/main/resources/resourcepacks/default_to_totem/pack.mcmeta b/src/main/resources/resourcepacks/default_to_totem/pack.mcmeta new file mode 100644 index 0000000..482458d --- /dev/null +++ b/src/main/resources/resourcepacks/default_to_totem/pack.mcmeta @@ -0,0 +1,7 @@ +{ + "pack": { + "pack_format": 32, + "supported_formats": [1, 9999], + "description": {"type": "translatable", "translate": "blahaj_totem.resourcepack.default_to_totem.description"} + } +} diff --git a/src/main/resources/resourcepacks/default_to_totem/pack.png b/src/main/resources/resourcepacks/default_to_totem/pack.png new file mode 100644 index 0000000000000000000000000000000000000000..97f369577f73bc8038569c2caf92431b8d39c750 GIT binary patch literal 258 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPFP2=EDU1=4?izx(lS>8sl<7njF6 zKC3_4?!>U$Z9%khs{=n!77YaDD4zxjF_r}R1v5B2yO9RuG|;9? zJ$pMgnp|vd$@?2>|kQS4jW> literal 0 HcmV?d00001