diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a33ef3..36c2975 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -- Fixed compatibility with Wildfire's Female Gender Mod (Thanks @celestialfault) -- Removed CICADA as an included jar, it must now be downloaded separately. - - This allows me to update it separately from any dependent mods, hopefully providing a more stable experience. \ No newline at end of file +- Added an option to make Elytras reappear while flying. (Thanks @EminGT) +- Fixed button tooltips not appearing at all. +- Added Mexican Spanish translations (Thanks @TheLegendofSaram) \ No newline at end of file diff --git a/build.gradle b/build.gradle index 797a390..07b1614 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,8 @@ plugins { - id 'fabric-loom' version '1.4-SNAPSHOT' + 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' } sourceCompatibility = JavaVersion.VERSION_17 @@ -33,23 +34,23 @@ repositories { dependencies { // To change the versions see the gradle.properties file - minecraft "com.mojang:minecraft:${project.minecraft_version}" - mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" - modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + minecraft "com.mojang:minecraft:${property("deps.minecraft")}" + mappings "net.fabricmc:yarn:${property("deps.yarn")}:v2" + modImplementation "net.fabricmc:fabric-loader:${property("deps.fabricloader")}" // Fabric API. This is technically optional, but you probably want it anyway. - modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" + modImplementation "net.fabricmc.fabric-api:fabric-api:${property("deps.fabric-api")}" - modImplementation("nl.enjarai:cicada-lib:${project.cicada_version}") { + modImplementation("nl.enjarai:cicada-lib:${property("deps.cicada")}") { exclude group: "net.fabricmc.fabric-api" } // Mod Menu integration. - modImplementation "com.terraformersmc:modmenu:${modmenu_version}" + modImplementation "com.terraformersmc:modmenu:${property("deps.modmenu")}" // Cardinal Components for shrimple™ server syncing. - include modImplementation("dev.onyxstudios.cardinal-components-api:cardinal-components-base:${project.cardinal_components_version}") - include modImplementation("dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${project.cardinal_components_version}") + include modImplementation("dev.onyxstudios.cardinal-components-api:cardinal-components-base:${property("deps.cardinal-components-api")}") + include modImplementation("dev.onyxstudios.cardinal-components-api:cardinal-components-entity:${property("deps.cardinal-components-api")}") // Make it easier to test skin compat. // modImplementation 'com.ptsmods:devlogin:2.1' @@ -63,7 +64,7 @@ processResources { } } -version = "$version+$minecraft_version" +version = "$version+${property("deps.minecraft")}" tasks.withType(JavaCompile).configureEach { // Minecraft 1.18 (1.18-pre2) upwards uses Java 17. @@ -83,6 +84,11 @@ jar { } } +yamlang { + targetSourceSets = [sourceSets.main] + inputDir = "assets/showmeyourskin/lang" +} + // configure the maven publication publishing { publications { @@ -106,7 +112,7 @@ loom { publishMods { file = remapJar.archiveFile - displayName = "${property('mod_version')} for ${property('minecraft_version')}" + displayName = "${property('mod_version')} for ${property('deps.minecraft')}" version = project.version changelog = getRootProject().file("CHANGELOG.md").text type = STABLE diff --git a/gradle.properties b/gradle.properties index 867d49a..97ed7dc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,12 +3,12 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/develop -minecraft_version=1.20.2 -yarn_mappings=1.20.2+build.4 -loader_version=0.15.2 +deps.minecraft=1.20.2 +deps.yarn=1.20.2+build.4 +deps.fabricloader=0.15.10 # Mod Properties -mod_version = 1.9.0 +mod_version = 1.11.0 maven_group = nl.enjarai archives_base_name = show-me-your-skin @@ -20,9 +20,9 @@ mod_github=enjarai/show-me-your-skin git_branch=1.20.2 # Dependencies -fabric_version=0.90.0+1.20.2 +deps.fabric-api=0.91.6+1.20.2 # https://modrinth.com/mod/modmenu/versions -modmenu_version=8.0.0 -cicada_version=0.6.2+1.20.2-and-above +deps.modmenu=8.0.1 +deps.cicada=0.7.2+1.20.2-1.20.4 # https://github.com/OnyxStudios/Cardinal-Components-API/releases -cardinal_components_version=5.3.0 \ No newline at end of file +deps.cardinal-components-api=5.3.0 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index db9a6b8..17655d0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/nl/enjarai/showmeyourskin/ShowMeYourSkinClient.java b/src/main/java/nl/enjarai/showmeyourskin/ShowMeYourSkinClient.java index 62787bb..fdb808e 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/ShowMeYourSkinClient.java +++ b/src/main/java/nl/enjarai/showmeyourskin/ShowMeYourSkinClient.java @@ -11,10 +11,10 @@ import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.nbt.NbtCompound; import nl.enjarai.cicada.api.conversation.ConversationManager; +import nl.enjarai.cicada.api.cursed.DummyClientPlayerEntity; import nl.enjarai.cicada.api.util.CicadaEntrypoint; import nl.enjarai.cicada.api.util.JsonSource; import nl.enjarai.showmeyourskin.client.ModKeyBindings; -import nl.enjarai.showmeyourskin.client.cursed.DummyClientPlayerEntity; import nl.enjarai.showmeyourskin.config.ArmorConfig; import nl.enjarai.showmeyourskin.config.ModConfig; import nl.enjarai.showmeyourskin.config.SyncedModConfig; diff --git a/src/main/java/nl/enjarai/showmeyourskin/client/cursed/CursedRegistry.java b/src/main/java/nl/enjarai/showmeyourskin/client/cursed/CursedRegistry.java deleted file mode 100644 index 20fcc95..0000000 --- a/src/main/java/nl/enjarai/showmeyourskin/client/cursed/CursedRegistry.java +++ /dev/null @@ -1,222 +0,0 @@ -package nl.enjarai.showmeyourskin.client.cursed; - -import com.mojang.datafixers.util.Pair; -import com.mojang.serialization.Lifecycle; -import net.minecraft.registry.Registry; -import net.minecraft.registry.RegistryKey; -import net.minecraft.registry.RegistryWrapper; -import net.minecraft.registry.entry.RegistryEntry; -import net.minecraft.registry.entry.RegistryEntryList; -import net.minecraft.registry.entry.RegistryEntryOwner; -import net.minecraft.registry.tag.TagKey; -import net.minecraft.util.Identifier; -import net.minecraft.util.math.random.Random; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.*; -import java.util.stream.Stream; - -@SuppressWarnings("deprecation") -public record CursedRegistry(RegistryKey> registryKey, Identifier defaultId, T defaultValue) implements Registry, RegistryEntryOwner { - - @Override - public RegistryKey> getKey() { - return registryKey; - } - - @Nullable - @Override - public Identifier getId(T value) { - return defaultId; - } - - @Override - public Optional> getKey(T entry) { - return Optional.empty(); - } - - @Override - public int getRawId(@Nullable T value) { - return 0; - } - - @Nullable - @Override - public T get(int index) { - return defaultValue; - } - - @Override - public int size() { - return 1; - } - - @Nullable - @Override - public T get(@Nullable RegistryKey key) { - return defaultValue; - } - - @Nullable - @Override - public T get(@Nullable Identifier id) { - return defaultValue; - } - - @Override - public Lifecycle getEntryLifecycle(T entry) { - return Lifecycle.experimental(); - } - - @Override - public Lifecycle getLifecycle() { - return Lifecycle.experimental(); - } - - @Override - public Set getIds() { - return Set.of(defaultId); - } - - @Override - public Set, T>> getEntrySet() { - return Set.of(); - } - - @Override - public Set> getKeys() { - return Set.of(); - } - - @Override - public Optional> getRandom(Random random) { - return Optional.empty(); - } - - @Override - public boolean containsId(Identifier id) { - return true; - } - - @Override - public boolean contains(RegistryKey key) { - return true; - } - - @Override - public Registry freeze() { - return this; - } - - @Override - public RegistryEntry.Reference createEntry(T value) { - return RegistryEntry.Reference.intrusive(this, value); - } - - @Override - public Optional> getEntry(int rawId) { - return Optional.empty(); - } - - @Override - public Optional> getEntry(RegistryKey key) { - return Optional.of(RegistryEntry.Reference.standAlone(this, key)); - } - - @Override - public RegistryEntry getEntry(T value) { - return RegistryEntry.of(value); - } - - @Override - public Stream> streamEntries() { - return null; - } - - @Override - public Optional> getEntryList(TagKey tag) { - return Optional.empty(); - } - - @Override - public RegistryEntryList.Named getOrCreateEntryList(TagKey tag) { - return RegistryEntryList.of(this, tag); - } - - @Override - public Stream, RegistryEntryList.Named>> streamTagsAndEntries() { - return Stream.empty(); - } - - @Override - public Stream> streamTags() { - return Stream.empty(); - } - - @Override - public void clearTags() { - - } - - @Override - public void populateTags(Map, List>> tagEntries) { - - } - - @Override - public RegistryEntryOwner getEntryOwner() { - return this; - } - - @Override - public RegistryWrapper.Impl getReadOnlyWrapper() { - return new RegistryWrapper.Impl() { - @Override - public RegistryKey> getRegistryKey() { - return CursedRegistry.this.registryKey; - } - - @Override - public Lifecycle getLifecycle() { - return Lifecycle.experimental(); - } - - @Override - public Stream> streamEntries() { - return Stream.empty(); - } - - @Override - public Stream> streamTags() { - return Stream.empty(); - } - - @Override - public Optional> getOptional(RegistryKey key) { - return Optional.empty(); - } - - @Override - public Optional> getOptional(TagKey tag) { - return Optional.empty(); - } - }; - } - - @NotNull - @Override - public Iterator iterator() { - return new Iterator() { - @Override - public boolean hasNext() { - return false; - } - - @Override - public T next() { - return null; - } - }; - } -} diff --git a/src/main/java/nl/enjarai/showmeyourskin/client/cursed/CursedRegistryEntry.java b/src/main/java/nl/enjarai/showmeyourskin/client/cursed/CursedRegistryEntry.java deleted file mode 100644 index cd594d5..0000000 --- a/src/main/java/nl/enjarai/showmeyourskin/client/cursed/CursedRegistryEntry.java +++ /dev/null @@ -1,71 +0,0 @@ -package nl.enjarai.showmeyourskin.client.cursed; - -import com.mojang.datafixers.util.Either; -import net.minecraft.registry.Registry; -import net.minecraft.registry.RegistryKey; -import net.minecraft.registry.entry.RegistryEntry; -import net.minecraft.registry.entry.RegistryEntryOwner; -import net.minecraft.registry.tag.TagKey; -import net.minecraft.util.Identifier; -import nl.enjarai.showmeyourskin.ShowMeYourSkin; - -import java.util.Optional; -import java.util.function.Predicate; -import java.util.stream.Stream; - -public record CursedRegistryEntry(T value, RegistryKey> key) implements RegistryEntry { - @Override - public boolean hasKeyAndValue() { - return true; - } - - @Override - public boolean matchesId(Identifier id) { - return false; - } - - @Override - public boolean matchesKey(RegistryKey key) { - return false; - } - - @Override - public boolean isIn(TagKey tag) { - return false; - } - - @Override - public boolean matches(Predicate> predicate) { - return false; - } - - @Override - public Either, T> getKeyOrValue() { - return Either.right(this.value); - } - - @Override - public Optional> getKey() { - return Optional.of(RegistryKey.of(key, ShowMeYourSkin.id("dummy"))); - } - - @Override - public Type getType() { - return Type.DIRECT; - } - - @Override - public String toString() { - return "CursedRegistryEntry(THIS IS FROM SHOW ME YOUR SKIN, SORRY IN ADVANCE FOR ANY ISSUES CAUSED){" + this.value + "}"; - } - - @Override - public boolean ownerEquals(RegistryEntryOwner owner) { - return true; - } - - @Override - public Stream> streamTags() { - return Stream.of(); - } -} diff --git a/src/main/java/nl/enjarai/showmeyourskin/client/cursed/DummyClientPlayNetworkHandler.java b/src/main/java/nl/enjarai/showmeyourskin/client/cursed/DummyClientPlayNetworkHandler.java deleted file mode 100644 index 67e595b..0000000 --- a/src/main/java/nl/enjarai/showmeyourskin/client/cursed/DummyClientPlayNetworkHandler.java +++ /dev/null @@ -1,115 +0,0 @@ -package nl.enjarai.showmeyourskin.client.cursed; - -import com.mojang.serialization.Lifecycle; -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.network.ClientConnectionState; -import net.minecraft.client.network.ClientPlayNetworkHandler; -import net.minecraft.client.network.ServerInfo; -import net.minecraft.entity.damage.DamageScaling; -import net.minecraft.entity.damage.DamageType; -import net.minecraft.network.ClientConnection; -import net.minecraft.network.NetworkSide; -import net.minecraft.registry.*; -import net.minecraft.registry.entry.RegistryEntry; -import net.minecraft.registry.tag.BlockTags; -import net.minecraft.resource.featuretoggle.FeatureSet; -import net.minecraft.util.math.intprovider.UniformIntProvider; -import net.minecraft.world.biome.Biome; -import net.minecraft.world.dimension.DimensionType; -import net.minecraft.world.dimension.DimensionTypes; -import nl.enjarai.showmeyourskin.ShowMeYourSkin; - -import java.time.Duration; -import java.util.Optional; -import java.util.OptionalLong; -import java.util.stream.Stream; - -public class DummyClientPlayNetworkHandler extends ClientPlayNetworkHandler { - public static final Registry CURSED_DIMENSION_TYPE_REGISTRY = new SimpleRegistry<>(RegistryKeys.DIMENSION_TYPE, Lifecycle.stable()); - static { - Registry.register(CURSED_DIMENSION_TYPE_REGISTRY, ShowMeYourSkin.id("dummy"), new DimensionType( - OptionalLong.of(6000L), - true, - false, - false, - true, - 1.0, - true, - false, - -64, - 384, - 384, - BlockTags.INFINIBURN_OVERWORLD, - DimensionTypes.OVERWORLD_ID, - 0.0f, - new DimensionType.MonsterSettings( - false, - true, - UniformIntProvider.create(0, 7), - 0 - ) - )); - } - - private static DummyClientPlayNetworkHandler instance; - - public static DummyClientPlayNetworkHandler getInstance() { - if (instance == null) instance = new DummyClientPlayNetworkHandler(); - return instance; - } - - private static final Registry cursedBiomeRegistry = new SimpleDefaultedRegistry<>("dummy", RegistryKeys.BIOME, Lifecycle.stable(), true) { - @Override - public RegistryEntry.Reference entryOf(RegistryKey key) { - return null; - } - }; - - private static final DynamicRegistryManager.Immutable cursedRegistryManager = new DynamicRegistryManager.Immutable() { - private final CursedRegistry damageTypes = new CursedRegistry<>(RegistryKeys.DAMAGE_TYPE, ShowMeYourSkin.id("fake_damage"), - new DamageType("", DamageScaling.NEVER, 0)); - - @SuppressWarnings({"unchecked", "rawtypes"}) - @Override - public Optional getOptional(RegistryKey key) { - var x = Registries.REGISTRIES.get(key); - if (x != null) { - return Optional.of(x); - } else if (RegistryKeys.DAMAGE_TYPE.equals(key)) { - return Optional.of(damageTypes); - } else if (RegistryKeys.BIOME.equals(key)) { - return Optional.of(cursedBiomeRegistry); - } else if (RegistryKeys.DIMENSION_TYPE.equals(key)) { - return Optional.of(CURSED_DIMENSION_TYPE_REGISTRY); - } - - return Optional.empty(); - } - - @Override - public Stream> streamAllRegistries() { - return Stream.empty(); - } - }; - - private DummyClientPlayNetworkHandler() { - super( - MinecraftClient.getInstance(), - new ClientConnection(NetworkSide.CLIENTBOUND), - new ClientConnectionState( - MinecraftClient.getInstance().getGameProfile(), - MinecraftClient.getInstance().getTelemetryManager().createWorldSession(true, Duration.ZERO, null), - cursedRegistryManager.toImmutable(), - FeatureSet.empty(), - "", - new ServerInfo("", "", ServerInfo.ServerType.OTHER), - null - ) - ); - } - - @Override - public DynamicRegistryManager.Immutable getRegistryManager() { - return cursedRegistryManager; - } -} diff --git a/src/main/java/nl/enjarai/showmeyourskin/client/cursed/DummyClientPlayerEntity.java b/src/main/java/nl/enjarai/showmeyourskin/client/cursed/DummyClientPlayerEntity.java deleted file mode 100644 index 0aa924c..0000000 --- a/src/main/java/nl/enjarai/showmeyourskin/client/cursed/DummyClientPlayerEntity.java +++ /dev/null @@ -1,88 +0,0 @@ -package nl.enjarai.showmeyourskin.client.cursed; - -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.network.ClientPlayNetworkHandler; -import net.minecraft.client.network.ClientPlayerEntity; -import net.minecraft.client.network.PlayerListEntry; -import net.minecraft.client.render.entity.PlayerModelPart; -import net.minecraft.client.util.DefaultSkinHelper; -import net.minecraft.client.util.SkinTextures; -import net.minecraft.client.world.ClientWorld; -import net.minecraft.entity.EquipmentSlot; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.text.Text; -import org.jetbrains.annotations.Nullable; - -import java.util.UUID; -import java.util.function.Function; - -public class DummyClientPlayerEntity extends ClientPlayerEntity { - private static DummyClientPlayerEntity instance; - private SkinTextures skinTextures = null; - private PlayerEntity player = null; - public Function equippedStackSupplier = slot -> ItemStack.EMPTY; - - public static DummyClientPlayerEntity getInstance() { - if (instance == null) instance = new DummyClientPlayerEntity() { - @Override - public Text getName() { - return Text.translatable("gui.showmeyourskin.armorScreen.global"); - } - }; - return instance; - } - - private DummyClientPlayerEntity() { - super(MinecraftClient.getInstance(), DummyClientWorld.getInstance(), DummyClientPlayNetworkHandler.getInstance(), null, null,false, false); - setUuid(UUID.randomUUID()); - MinecraftClient.getInstance().getSkinProvider().fetchSkinTextures(getGameProfile()).thenAccept((textures) -> { - skinTextures = textures; - }); - } - - public DummyClientPlayerEntity(@Nullable PlayerEntity player, UUID uuid, SkinTextures skinTextures) { - this(player, uuid, skinTextures, DummyClientWorld.getInstance(), DummyClientPlayNetworkHandler.getInstance()); - } - - public DummyClientPlayerEntity(@Nullable PlayerEntity player, UUID uuid, SkinTextures skinTextures, ClientWorld world, ClientPlayNetworkHandler networkHandler) { - super(MinecraftClient.getInstance(), world, networkHandler, null, null,false, false); - this.player = player; - setUuid(uuid); - this.skinTextures = skinTextures; - } - - @Override - public boolean isPartVisible(PlayerModelPart modelPart) { - return true; - } - - @Override - public SkinTextures getSkinTextures() { - return skinTextures == null ? DefaultSkinHelper.getSkinTextures(this.getUuid()) : skinTextures; - } - - @Nullable - @Override - protected PlayerListEntry getPlayerListEntry() { - return null; - } - - @Override - public boolean isSpectator() { - return false; - } - - @Override - public boolean isCreative() { - return true; - } - - @Override - public ItemStack getEquippedStack(EquipmentSlot slot) { - if (player != null) { - return player.getEquippedStack(slot); - } - return equippedStackSupplier.apply(slot); - } -} diff --git a/src/main/java/nl/enjarai/showmeyourskin/client/cursed/DummyClientWorld.java b/src/main/java/nl/enjarai/showmeyourskin/client/cursed/DummyClientWorld.java deleted file mode 100644 index 4084126..0000000 --- a/src/main/java/nl/enjarai/showmeyourskin/client/cursed/DummyClientWorld.java +++ /dev/null @@ -1,40 +0,0 @@ -package nl.enjarai.showmeyourskin.client.cursed; - -import net.minecraft.client.MinecraftClient; -import net.minecraft.client.world.ClientWorld; -import net.minecraft.registry.DynamicRegistryManager; -import net.minecraft.registry.RegistryKey; -import net.minecraft.registry.RegistryKeys; -import net.minecraft.world.Difficulty; -import nl.enjarai.showmeyourskin.ShowMeYourSkin; - -public class DummyClientWorld extends ClientWorld { - - private static DummyClientWorld instance; - - public static DummyClientWorld getInstance() { - if (instance == null) instance = new DummyClientWorld(); - return instance; - } - - private DummyClientWorld() { - super( - DummyClientPlayNetworkHandler.getInstance(), - new Properties(Difficulty.EASY, false, true), - RegistryKey.of(RegistryKeys.WORLD, ShowMeYourSkin.id("dummy")), - DummyClientPlayNetworkHandler.CURSED_DIMENSION_TYPE_REGISTRY.entryOf( - RegistryKey.of(RegistryKeys.DIMENSION_TYPE, ShowMeYourSkin.id("dummy"))), - 0, - 0, - () -> MinecraftClient.getInstance().getProfiler(), - MinecraftClient.getInstance().worldRenderer, - false, - 0L - ); - } - - @Override - public DynamicRegistryManager getRegistryManager() { - return super.getRegistryManager(); - } -} diff --git a/src/main/java/nl/enjarai/showmeyourskin/config/ArmorConfig.java b/src/main/java/nl/enjarai/showmeyourskin/config/ArmorConfig.java index fe6a4f5..ff583e6 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/config/ArmorConfig.java +++ b/src/main/java/nl/enjarai/showmeyourskin/config/ArmorConfig.java @@ -15,6 +15,7 @@ public class ArmorConfig { public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( Codec.BOOL.fieldOf("showInCombat").forGetter(config -> config.showInCombat), Codec.BOOL.fieldOf("showNameTag").forGetter(config -> config.showNameTag), + Codec.BOOL.fieldOf("forceElytraWhenFlying").forGetter(config -> config.forceElytraWhenFlying), Codec.unboundedMap(HideableEquipment.getCodec(), ArmorPieceConfig.CODEC).fieldOf("pieces").forGetter(config -> config.pieces), Codec.unboundedMap(HideableEquipment.getSlotCodec(), ArmorPieceConfig.CODEC).fieldOf("trims").forGetter(config -> config.trims), Codec.unboundedMap(HideableEquipment.getCodec(), ArmorPieceConfig.CODEC).fieldOf("glints").forGetter(config -> config.glints) @@ -26,6 +27,7 @@ public class ArmorConfig { public final HashMap glints = new HashMap<>(); public boolean showInCombat = true; public boolean showNameTag = true; + public boolean forceElytraWhenFlying = true; public ArmorConfig() { pieces.put(HideableEquipment.HEAD, new ArmorPieceConfig()); @@ -50,10 +52,11 @@ public ArmorConfig() { glints.put(HideableEquipment.HAT, new ArmorPieceConfig()); } - public ArmorConfig(boolean showInCombat, boolean showNameTag, Map pieces, Map trims, Map glints) { + public ArmorConfig(boolean showInCombat, boolean showNameTag, boolean forceElytraWhenFlying, Map pieces, Map trims, Map glints) { this(); this.showInCombat = showInCombat; this.showNameTag = showNameTag; + this.forceElytraWhenFlying = forceElytraWhenFlying; this.pieces.putAll(pieces); this.trims.putAll(trims); this.glints.putAll(glints); @@ -114,6 +117,7 @@ public ArmorConfig copy() { return new ArmorConfig( showInCombat, showNameTag, + forceElytraWhenFlying, pieces.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().copy())), trims.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().copy())), glints.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().copy())) @@ -129,6 +133,7 @@ public boolean equals(Object o) { if (showInCombat != that.showInCombat) return false; if (showNameTag != that.showNameTag) return false; + if (forceElytraWhenFlying != that.forceElytraWhenFlying) return false; if (!pieces.equals(that.pieces)) return false; if (!trims.equals(that.trims)) return false; return glints.equals(that.glints); @@ -141,6 +146,7 @@ public int hashCode() { result = 31 * result + glints.hashCode(); result = 31 * result + (showInCombat ? 1 : 0); result = 31 * result + (showNameTag ? 1 : 0); + result = 31 * result + (forceElytraWhenFlying ? 1 : 0); return result; } diff --git a/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfig.java b/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfig.java index db09c10..fe42f97 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfig.java +++ b/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfig.java @@ -6,10 +6,13 @@ public interface SyncedModConfig { Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( Codec.BOOL.optionalFieldOf("allowNotShowInCombat", true).forGetter(SyncedModConfig::allowNotShowInCombat), - Codec.BOOL.optionalFieldOf("allowNotShowNameTag", true).forGetter(SyncedModConfig::allowNotShowNameTag) + Codec.BOOL.optionalFieldOf("allowNotShowNameTag", true).forGetter(SyncedModConfig::allowNotShowNameTag), + Codec.BOOL.optionalFieldOf("allowNotForceElytraWhenFlying", true).forGetter(SyncedModConfig::allowNotForceElytraWhenFlying) ).apply(instance, SyncedModConfigClient::new)); boolean allowNotShowInCombat(); boolean allowNotShowNameTag(); + + boolean allowNotForceElytraWhenFlying(); } diff --git a/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfigClient.java b/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfigClient.java index 00572de..8c93ae5 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfigClient.java +++ b/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfigClient.java @@ -1,4 +1,4 @@ package nl.enjarai.showmeyourskin.config; -public record SyncedModConfigClient(boolean allowNotShowInCombat, boolean allowNotShowNameTag) implements SyncedModConfig { +public record SyncedModConfigClient(boolean allowNotShowInCombat, boolean allowNotShowNameTag, boolean allowNotForceElytraWhenFlying) implements SyncedModConfig { } diff --git a/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfigServer.java b/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfigServer.java index 94c7170..6163da2 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfigServer.java +++ b/src/main/java/nl/enjarai/showmeyourskin/config/SyncedModConfigServer.java @@ -22,6 +22,7 @@ public class SyncedModConfigServer implements SyncedModConfig { public boolean allowNotShowInCombat = false; public boolean allowNotShowNameTag = false; + public boolean allowNotForceElytraWhenFlying = false; public static void load() { INSTANCE = loadConfigFile(CONFIG_FILE); @@ -81,4 +82,8 @@ public boolean allowNotShowInCombat() { public boolean allowNotShowNameTag() { return allowNotShowNameTag; } + + public boolean allowNotForceElytraWhenFlying() { + return allowNotForceElytraWhenFlying; + } } diff --git a/src/main/java/nl/enjarai/showmeyourskin/gui/ServerIntegratedConfigScreen.java b/src/main/java/nl/enjarai/showmeyourskin/gui/ServerIntegratedConfigScreen.java index bc7d765..e9ac56b 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/gui/ServerIntegratedConfigScreen.java +++ b/src/main/java/nl/enjarai/showmeyourskin/gui/ServerIntegratedConfigScreen.java @@ -4,9 +4,9 @@ import net.minecraft.client.gui.screen.ButtonTextures; import net.minecraft.client.gui.screen.Screen; import net.minecraft.text.Text; +import nl.enjarai.cicada.api.cursed.DummyClientPlayerEntity; import nl.enjarai.showmeyourskin.Components; import nl.enjarai.showmeyourskin.ShowMeYourSkinClient; -import nl.enjarai.showmeyourskin.client.cursed.DummyClientPlayerEntity; import nl.enjarai.showmeyourskin.config.ModConfig; import nl.enjarai.showmeyourskin.gui.widget.ArmorConfigWindow; import nl.enjarai.showmeyourskin.gui.widget.PressButtonWidget; diff --git a/src/main/java/nl/enjarai/showmeyourskin/gui/widget/ArmorConfigWindow.java b/src/main/java/nl/enjarai/showmeyourskin/gui/widget/ArmorConfigWindow.java index ad20894..d84f686 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/gui/widget/ArmorConfigWindow.java +++ b/src/main/java/nl/enjarai/showmeyourskin/gui/widget/ArmorConfigWindow.java @@ -31,10 +31,11 @@ import net.minecraft.util.Identifier; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RotationAxis; +import nl.enjarai.cicada.api.cursed.DummyClientPlayerEntity; +import nl.enjarai.cicada.api.screen.DrawUtils; import nl.enjarai.showmeyourskin.ShowMeYourSkin; import nl.enjarai.showmeyourskin.ShowMeYourSkinClient; import nl.enjarai.showmeyourskin.client.cursed.AlwaysGlintingStack; -import nl.enjarai.showmeyourskin.client.cursed.DummyClientPlayerEntity; import nl.enjarai.showmeyourskin.config.ArmorConfig; import nl.enjarai.showmeyourskin.config.HideableEquipment; import nl.enjarai.showmeyourskin.config.ModConfig; @@ -57,6 +58,7 @@ public class ArmorConfigWindow extends AbstractParentElement implements Drawable protected static final ButtonTextures TOGGLE_GLINT_BUTTON_TEXTURES = ToggleButtonWidget.createTextures("show_glint"); protected static final ButtonTextures SHOW_IN_COMBAT_BUTTON_TEXTURES = ToggleButtonWidget.createTextures("show_in_combat"); protected static final ButtonTextures SHOW_NAME_TAG_BUTTON_TEXTURES = ToggleButtonWidget.createTextures("show_nametag"); + protected static final ButtonTextures FORCE_ELYTRA_WHEN_FLYING_BUTTON_TEXTURES = ToggleButtonWidget.createTextures("force_elytra_when_flying"); private static final ItemStack HEAD_ARMOR = new AlwaysGlintingStack(Items.NETHERITE_HELMET); private static final ItemStack CHEST_ARMOR = new AlwaysGlintingStack(Items.NETHERITE_CHESTPLATE); @@ -144,12 +146,20 @@ public ArmorConfigWindow(Screen parent, int x, int y, Text name, DummyClientPlay if (!hideOptions || serverConfig.get().allowNotShowNameTag()) { buttons.add(new ToggleButtonWidget( - getWindowLeft() + 14, getWindowTop() + 141, 20, 20, + getWindowLeft() + 40, getWindowTop() + 115, 20, 20, SHOW_NAME_TAG_BUTTON_TEXTURES, armorConfig.showNameTag, (btn, b) -> armorConfig.showNameTag = b, NAME_TAG_TOOLTIP )); } + if (!hideOptions || serverConfig.get().allowNotForceElytraWhenFlying()) { + buttons.add(new ToggleButtonWidget( + getWindowLeft() + 66, getWindowTop() + 115, 20, 20, + FORCE_ELYTRA_WHEN_FLYING_BUTTON_TEXTURES, + armorConfig.forceElytraWhenFlying, (btn, b) -> armorConfig.forceElytraWhenFlying = b, NAME_TAG_TOOLTIP + )); + } + children.addAll(buttons); } @@ -226,7 +236,11 @@ public void render(DrawContext context, int mouseX, int mouseY, float delta) { getWindowRight() - 112, getWindowTop() + 8, getWindowRight() - 5, getWindowTop() + 168 ); - drawEntity(matrices, 0, 0, 70, -mouseX + playerX, -mouseY + playerY - 110, player); + DrawUtils.drawEntityFollowingMouse( + matrices, 0, 0, 70, + getCurrentPlayerRotation(), mouseX - playerX, mouseY - playerY, + player + ); context.disableScissor(); matrices.pop(); @@ -395,59 +409,6 @@ public SelectionType getType() { return SelectionType.NONE; } - public void drawEntity(MatrixStack matrices, int x, int y, int size, double mouseX, double mouseY, LivingEntity entity) { - float f = (float) (Math.atan(mouseX / 40.0F) * Math.sin((getCurrentPlayerRotation() / 180.0 + 0.5) * Math.PI)); - float g = (float)Math.atan(mouseY / 40.0F); - Quaternionf quaternionf = (new Quaternionf()).rotateZ(3.1415927F); - Quaternionf quaternionf2 = (new Quaternionf()).rotateX(g * 20.0F * 0.017453292F); - quaternionf.mul(quaternionf2); - float h = entity.bodyYaw; - float i = entity.getYaw(); - float j = entity.getPitch(); - float k = entity.prevHeadYaw; - float l = entity.headYaw; - entity.bodyYaw = 180.0F + f * 20.0F; - entity.setYaw(180.0F + f * 40.0F); - entity.setPitch(-g * 20.0F); - entity.headYaw = entity.getYaw(); - entity.prevHeadYaw = entity.getYaw(); - drawEntity(matrices, x, y, size, quaternionf, quaternionf2, entity); - entity.bodyYaw = h; - entity.setYaw(i); - entity.setPitch(j); - entity.prevHeadYaw = k; - entity.headYaw = l; - } - - @SuppressWarnings("deprecation") - public static void drawEntity(MatrixStack matrices, int x, int y, int size, Quaternionf quaternionf, @Nullable Quaternionf quaternionf2, LivingEntity entity) { - MatrixStack matrixStack = RenderSystem.getModelViewStack(); - matrixStack.push(); - matrixStack.translate(0.0, 0.0, 1000.0); - RenderSystem.applyModelViewMatrix(); - matrices.push(); - matrices.translate(x, y, -950.0); - matrices.multiplyPositionMatrix(new Matrix4f().scaling(size, size, -size)); - matrices.translate(0, -1, 0); - matrices.multiply(quaternionf); - matrices.translate(0, -1, 0); - DiffuseLighting.method_34742(); - EntityRenderDispatcher entityRenderDispatcher = MinecraftClient.getInstance().getEntityRenderDispatcher(); - if (quaternionf2 != null) { - quaternionf2.conjugate(); - entityRenderDispatcher.setRotation(quaternionf2); - } - entityRenderDispatcher.setRenderShadows(false); - VertexConsumerProvider.Immediate immediate = MinecraftClient.getInstance().getBufferBuilders().getEntityVertexConsumers(); - RenderSystem.runAsFancy(() -> entityRenderDispatcher.render(entity, 0.0, 0.0, 0.0, 0.0f, 1.0f, matrices, immediate, 0xF000F0)); - immediate.draw(); - entityRenderDispatcher.setRenderShadows(true); - matrices.pop(); - DiffuseLighting.enableGuiDepthLighting(); - matrixStack.pop(); - RenderSystem.applyModelViewMatrix(); - } - private static ItemStack getDummyArmor(EquipmentSlot slot) { return switch (slot) { case HEAD -> HEAD_ARMOR; diff --git a/src/main/java/nl/enjarai/showmeyourskin/gui/widget/ConfigEntryWidget.java b/src/main/java/nl/enjarai/showmeyourskin/gui/widget/ConfigEntryWidget.java index 5cb5178..715ce37 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/gui/widget/ConfigEntryWidget.java +++ b/src/main/java/nl/enjarai/showmeyourskin/gui/widget/ConfigEntryWidget.java @@ -10,8 +10,8 @@ import net.minecraft.sound.SoundEvents; import net.minecraft.text.Text; import net.minecraft.util.Identifier; +import nl.enjarai.cicada.api.cursed.DummyClientPlayerEntity; import nl.enjarai.showmeyourskin.ShowMeYourSkin; -import nl.enjarai.showmeyourskin.client.cursed.DummyClientPlayerEntity; import nl.enjarai.showmeyourskin.config.ArmorConfig; import nl.enjarai.showmeyourskin.config.ModConfig; diff --git a/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PlayerSelectorEntry.java b/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PlayerSelectorEntry.java index 5dc2e63..858fa62 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PlayerSelectorEntry.java +++ b/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PlayerSelectorEntry.java @@ -13,8 +13,8 @@ import net.minecraft.client.util.SkinTextures; import net.minecraft.sound.SoundEvents; import net.minecraft.text.Text; +import nl.enjarai.cicada.api.cursed.DummyClientPlayerEntity; import nl.enjarai.showmeyourskin.ShowMeYourSkin; -import nl.enjarai.showmeyourskin.client.cursed.DummyClientPlayerEntity; import nl.enjarai.showmeyourskin.config.ModConfig; import java.util.List; diff --git a/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PlayerSelectorWidget.java b/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PlayerSelectorWidget.java index 04164b5..2aab1eb 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PlayerSelectorWidget.java +++ b/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PlayerSelectorWidget.java @@ -6,7 +6,7 @@ import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder; import net.minecraft.client.network.PlayerListEntry; import net.minecraft.text.Text; -import nl.enjarai.showmeyourskin.client.cursed.DummyClientPlayerEntity; +import nl.enjarai.cicada.api.cursed.DummyClientPlayerEntity; import org.jetbrains.annotations.Nullable; import java.util.List; diff --git a/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PressButtonWidget.java b/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PressButtonWidget.java index a433803..3ac80b9 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PressButtonWidget.java +++ b/src/main/java/nl/enjarai/showmeyourskin/gui/widget/PressButtonWidget.java @@ -4,6 +4,7 @@ import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.ButtonTextures; import net.minecraft.client.gui.screen.narration.NarrationMessageBuilder; +import net.minecraft.client.gui.tooltip.Tooltip; import net.minecraft.client.gui.widget.PressableWidget; import net.minecraft.screen.ScreenTexts; import net.minecraft.text.Text; @@ -22,15 +23,15 @@ public class PressButtonWidget extends PressableWidget { protected final ButtonTextures textures; private final Consumer pressAction; - @Nullable - protected final Text tooltip; public PressButtonWidget(int x, int y, int width, int height, ButtonTextures textures, Consumer pressAction, @Nullable Text tooltip) { super(x, y, width, height, ScreenTexts.EMPTY); this.textures = textures; this.pressAction = pressAction; - this.tooltip = tooltip; + if (tooltip != null) { + setTooltip(Tooltip.of(tooltip)); + } } @Override diff --git a/src/main/java/nl/enjarai/showmeyourskin/mixin/LivingEntityRendererMixin.java b/src/main/java/nl/enjarai/showmeyourskin/mixin/LivingEntityRendererMixin.java index 7f90c72..a4dd135 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/mixin/LivingEntityRendererMixin.java +++ b/src/main/java/nl/enjarai/showmeyourskin/mixin/LivingEntityRendererMixin.java @@ -2,7 +2,7 @@ import net.minecraft.client.render.entity.LivingEntityRenderer; import net.minecraft.entity.LivingEntity; -import nl.enjarai.showmeyourskin.client.cursed.DummyClientPlayerEntity; +import nl.enjarai.cicada.api.cursed.DummyClientPlayerEntity; import nl.enjarai.showmeyourskin.config.ModConfig; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; diff --git a/src/main/java/nl/enjarai/showmeyourskin/mixin/elytra/ElytraFeatureRendererMixin.java b/src/main/java/nl/enjarai/showmeyourskin/mixin/elytra/ElytraFeatureRendererMixin.java index 58f332e..56bfe62 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/mixin/elytra/ElytraFeatureRendererMixin.java +++ b/src/main/java/nl/enjarai/showmeyourskin/mixin/elytra/ElytraFeatureRendererMixin.java @@ -38,8 +38,10 @@ public ElytraFeatureRendererMixin(FeatureRendererContext context) { MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, T livingEntity, float f, float g, float h, float j, float k, float l, CallbackInfo ci) { if (livingEntity instanceof PlayerEntity player) { - if (ModConfig.INSTANCE.getApplicablePieceTransparency(player.getUuid(), HideableEquipment.ELYTRA) <= 0) { - ci.cancel(); + if (!player.isFallFlying() || !ModConfig.INSTANCE.getApplicable(player.getUuid()).forceElytraWhenFlying) { + if (ModConfig.INSTANCE.getApplicablePieceTransparency(player.getUuid(), HideableEquipment.ELYTRA) <= 0) { + ci.cancel(); + } } } } @@ -71,9 +73,11 @@ public ElytraFeatureRendererMixin(FeatureRendererContext context) { VertexConsumerProvider vertexConsumerProvider, RenderLayer renderLayer, boolean solid, boolean hasGlint, Operation original, @Local(argsOnly = true) LivingEntity entity) { if (entity instanceof PlayerEntity player) { - var transparency = ModConfig.INSTANCE.getApplicablePieceTransparency(player.getUuid(), HideableEquipment.ELYTRA); - if (transparency < 1) { - return ItemRenderer.getDirectItemGlintConsumer(vertexConsumerProvider, renderLayer, solid, hasGlint); + if (!player.isFallFlying() || !ModConfig.INSTANCE.getApplicable(player.getUuid()).forceElytraWhenFlying) { + var transparency = ModConfig.INSTANCE.getApplicablePieceTransparency(player.getUuid(), HideableEquipment.ELYTRA); + if (transparency < 1) { + return ItemRenderer.getDirectItemGlintConsumer(vertexConsumerProvider, renderLayer, solid, hasGlint); + } } } @@ -90,9 +94,11 @@ public ElytraFeatureRendererMixin(FeatureRendererContext context) { private RenderLayer showmeyourskin$enableElytraTransparency2( Identifier texture, Operation original, @Local(argsOnly = true) LivingEntity entity) { if (entity instanceof PlayerEntity player) { - var transparency = ModConfig.INSTANCE.getApplicablePieceTransparency(player.getUuid(), HideableEquipment.ELYTRA); - if (transparency < 1) { - return RenderLayer.getEntityTranslucent(texture); + if (!player.isFallFlying() || !ModConfig.INSTANCE.getApplicable(player.getUuid()).forceElytraWhenFlying) { + var transparency = ModConfig.INSTANCE.getApplicablePieceTransparency(player.getUuid(), HideableEquipment.ELYTRA); + if (transparency < 1) { + return RenderLayer.getEntityTranslucent(texture); + } } } @@ -109,9 +115,11 @@ public ElytraFeatureRendererMixin(FeatureRendererContext context) { ) private float showmeyourskin$applyElytraTransparency(float original, @Local(argsOnly = true) LivingEntity entity) { if (entity instanceof PlayerEntity player) { - var transparency = ModConfig.INSTANCE.getApplicablePieceTransparency(player.getUuid(), HideableEquipment.ELYTRA); - if (transparency < 1) { - return transparency; + if (!player.isFallFlying() || !ModConfig.INSTANCE.getApplicable(player.getUuid()).forceElytraWhenFlying) { + var transparency = ModConfig.INSTANCE.getApplicablePieceTransparency(player.getUuid(), HideableEquipment.ELYTRA); + if (transparency < 1) { + return transparency; + } } } diff --git a/src/main/java/nl/enjarai/showmeyourskin/util/ArmorConfigComponent.java b/src/main/java/nl/enjarai/showmeyourskin/util/ArmorConfigComponent.java index c17e41d..b423cab 100644 --- a/src/main/java/nl/enjarai/showmeyourskin/util/ArmorConfigComponent.java +++ b/src/main/java/nl/enjarai/showmeyourskin/util/ArmorConfigComponent.java @@ -45,6 +45,7 @@ public void setFromNbt(NbtCompound tag) { public void ensureValid() { if (!SyncedModConfigServer.INSTANCE.allowNotShowInCombat()) getConfig().showInCombat = true; if (!SyncedModConfigServer.INSTANCE.allowNotShowNameTag()) getConfig().showNameTag = true; + if (!SyncedModConfigServer.INSTANCE.allowNotForceElytraWhenFlying()) getConfig().forceElytraWhenFlying = true; } @Override diff --git a/src/main/resources/assets/showmeyourskin/lang/en_us.json b/src/main/resources/assets/showmeyourskin/lang/en_us.json deleted file mode 100644 index ee69423..0000000 --- a/src/main/resources/assets/showmeyourskin/lang/en_us.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "category.showmeyourskin.showmeyourskin": "Show Me Your Skin!", - "key.showmeyourskin.open_settings": "Open Armor Config", - "key.showmeyourskin.global_toggle": "Toggle Mod", - "key.showmeyourskin.global_toggle.enable": "§aEnabled §rarmor rendering customisation.", - "key.showmeyourskin.global_toggle.disable": "§cDisabled §rarmor rendering customisation.", - "gui.showmeyourskin.armorScreen.title": "Armor Config", - "gui.showmeyourskin.armorScreen.title.serverIntegrated": "Armor Config (Server)", - "gui.showmeyourskin.armorScreen.title.serverOverrides": "Armor Config (Local Overrides)", - "gui.showmeyourskin.armorScreen.globalToggleTooltip": "Global toggle, press %1$s to toggle ingame.", - "gui.showmeyourskin.armorScreen.overridesEnabled": "Enable local overrides.\n(not visible to other players)", - "gui.showmeyourskin.armorScreen.overridesConfigure": "Configure local overrides.\n(not visible to other players)", - "gui.showmeyourskin.armorScreen.global": "Global", - "gui.showmeyourskin.armorScreen.synced": "Synced", - "gui.showmeyourskin.armorScreen.overridden": "Overridden", - "gui.showmeyourskin.armorScreen.playerName": "%s", - "gui.showmeyourskin.armorScreen.playerSelector": "Armor Config", - "gui.showmeyourskin.armorScreen.piece.head": "Helmet: %d%%", - "gui.showmeyourskin.armorScreen.piece.chest": "Chestplate: %d%%", - "gui.showmeyourskin.armorScreen.piece.legs": "Leggings: %d%%", - "gui.showmeyourskin.armorScreen.piece.feet": "Boots: %d%%", - "gui.showmeyourskin.armorScreen.piece.elytra": "Elytra: %d%%", - "gui.showmeyourskin.armorScreen.piece.shield": "Shield: %d%%", - "gui.showmeyourskin.armorScreen.piece.hat": "Hat: %d%%", - "gui.showmeyourskin.armorScreen.glintTooltip": "Enable enchantment glint", - "gui.showmeyourskin.armorScreen.combatTooltip": "Automatically disable transparency in combat", - "gui.showmeyourskin.armorScreen.nameTagTooltip": "Show player name tag", - "gui.showmeyourskin.armorScreen.showElytraTooltip": "Show Elytra", - "gui.showmeyourskin.armorScreen.shieldGlintTooltip": "Show enchantment glint on shield", - "gui.showmeyourskin.armorScreen.openButtonTooltip": "Open armor transparency override", - "gui.showmeyourskin.armorScreen.deleteButtonTooltip": "Delete transparency override" -} \ No newline at end of file diff --git a/src/main/resources/assets/showmeyourskin/lang/en_us.yml b/src/main/resources/assets/showmeyourskin/lang/en_us.yml new file mode 100644 index 0000000..ed27ad8 --- /dev/null +++ b/src/main/resources/assets/showmeyourskin/lang/en_us.yml @@ -0,0 +1,40 @@ +category: + showmeyourskin: + showmeyourskin: Show Me Your Skin! +key: + showmeyourskin: + open_settings: Open Armor Config + global_toggle: + .: Toggle Mod + enable: "§aEnabled §rarmor rendering customisation." + disable: "§cDisabled §rarmor rendering customisation." +gui: + showmeyourskin: + armorScreen: + title: + .: Armor Config + serverIntegrated: Armor Config (Server) + serverOverrides: Armor Config (Local Overrides) + globalToggleTooltip: Global toggle, press %1$s to toggle ingame. + overridesEnabled: "Enable local overrides.\n(not visible to other players)" + overridesConfigure: "Configure local overrides.\n(not visible to other players)" + global: Global + synced: Synced + overridden: Overridden + playerName: "%s" + playerSelector: Armor Config + piece: + head: "Helmet: %d%%" + chest: "Chestplate: %d%%" + legs: "Leggings: %d%%" + feet: "Boots: %d%%" + elytra: "Elytra: %d%%" + shield: "Shield: %d%%" + hat: "Hat: %d%%" + glintTooltip: Enable enchantment glint + combatTooltip: Automatically disable transparency in combat + nameTagTooltip: Show player name tag + showElytraTooltip: Show Elytra + shieldGlintTooltip: Show enchantment glint on shield + openButtonTooltip: Open armor transparency override + deleteButtonTooltip: Delete transparency override diff --git a/src/main/resources/assets/showmeyourskin/lang/es_mx.yml b/src/main/resources/assets/showmeyourskin/lang/es_mx.yml new file mode 100644 index 0000000..55ce23e --- /dev/null +++ b/src/main/resources/assets/showmeyourskin/lang/es_mx.yml @@ -0,0 +1,40 @@ +category: + showmeyourskin: + showmeyourskin: Show Me Your Skin! +key: + showmeyourskin: + open_settings: Abrir configuración de armadura + global_toggle: + .: Alternar Mod + enable: "§aHabilitado§r personalización de armadura." + disable: "§cDeshabilitado§r personalización de armadura." +gui: + showmeyourskin: + armorScreen: + title: + .: Configuración de Armadura + serverIntegrated: Configuración de Armadura (Servidor) + serverOverrides: Configuración de Armadura (Anulaciones Locales) + globalToggleTooltip: Alternar globalmente, presiona %1$s para alternar en el juego. + overridesEnabled: "Habilitar anulaciones locales.\n(no visible para otros jugadores)" + overridesConfigure: "Configurar anulaciones locales.\n(no visible para otros jugadores)" + global: Global + synced: Sincronizado + overridden: Anulado + playerName: "%s" + playerSelector: Configuración de Armadura + piece: + head: "Yelmo: %d%%" + chest: "Pechera: %d%%" + legs: "Grebas: %d%%" + feet: "Botas: %d%%" + elytra: "Elytra: %d%%" + shield: "Escudo: %d%%" + hat: "Sombrero: %d%%" + glintTooltip: Habilitar brillo de encantamiento + combatTooltip: Desactivar automáticamente la transparencia en combate + nameTagTooltip: Mostrar etiqueta de nombre del jugador + showElytraTooltip: Mostrar Elytra + shieldGlintTooltip: Mostrar brillo de encantamiento en el escudo + openButtonTooltip: Abrir anulación de transparencia de armadura + deleteButtonTooltip: Eliminar anulación de transparencia diff --git a/src/main/resources/assets/showmeyourskin/lang/nl_nl.json b/src/main/resources/assets/showmeyourskin/lang/nl_nl.json deleted file mode 100644 index 0803ff0..0000000 --- a/src/main/resources/assets/showmeyourskin/lang/nl_nl.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "category.showmeyourskin.showmeyourskin": "Show Me Your Skin!", - "key.showmeyourskin.open_settings": "Open Harnas Configuratie", - "key.showmeyourskin.global_toggle": "Globale Schakelaar", - "key.showmeyourskin.global_toggle.enable": "Harnas render aanpassingen aangezet.", - "key.showmeyourskin.global_toggle.disable": "Harnas render aanpassingen uitgezet.", - "gui.showmeyourskin.armorScreen.globalToggleTooltip": "Globale schakel, druk op %1$s om aan of uit te zetten in het spel.", - "gui.showmeyourskin.armorScreen.global": "Globaal", - "gui.showmeyourskin.armorScreen.playerSelector": "Harnas Configuratie", - "gui.showmeyourskin.armorScreen.piece.head": "Helm: %d%%", - "gui.showmeyourskin.armorScreen.piece.chest": "Kuras: %d%%", - "gui.showmeyourskin.armorScreen.piece.legs": "Beenstukken: %d%%", - "gui.showmeyourskin.armorScreen.piece.feet": "Laarzen: %d%%", - "gui.showmeyourskin.armorScreen.piece.elytra": "Dekschild: %d%%", - "gui.showmeyourskin.armorScreen.piece.shield": "Schild: %d%%", - "gui.showmeyourskin.armorScreen.glintTooltip": "Activeer betoveringsgloed", - "gui.showmeyourskin.armorScreen.combatTooltip": "Deactiveer automatisch de transparantie in een gevecht", - "gui.showmeyourskin.armorScreen.nameTagTooltip": "Laat het naamplaatje van de speler zien", - "gui.showmeyourskin.armorScreen.showElytraTooltip": "Laat Dekschild zien", - "gui.showmeyourskin.armorScreen.shieldGlintTooltip": "Betoveringsgloed laten zien op schild", - "gui.showmeyourskin.armorScreen.openButtonTooltip": "Open harnas transparantie overschrijving", - "gui.showmeyourskin.armorScreen.deleteButtonTooltip": "Verwijder transparantie overschrijving" -} \ No newline at end of file diff --git a/src/main/resources/assets/showmeyourskin/lang/nl_nl.yml b/src/main/resources/assets/showmeyourskin/lang/nl_nl.yml new file mode 100644 index 0000000..6375856 --- /dev/null +++ b/src/main/resources/assets/showmeyourskin/lang/nl_nl.yml @@ -0,0 +1,30 @@ +category: + showmeyourskin: + showmeyourskin: Show Me Your Skin! +key: + showmeyourskin: + open_settings: Open Harnas Configuratie + global_toggle: + .: Globale Schakelaar + enable: Harnas render aanpassingen aangezet. + disable: Harnas render aanpassingen uitgezet. +gui: + showmeyourskin: + armorScreen: + globalToggleTooltip: Globale schakel, druk op %1$s om aan of uit te zetten in het spel. + global: Globaal + playerSelector: Harnas Configuratie + piece: + head: "Helm: %d%%" + chest: "Kuras: %d%%" + legs: "Beenstukken: %d%%" + feet: "Laarzen: %d%%" + elytra: "Dekschild: %d%%" + shield: "Schild: %d%%" + glintTooltip: Activeer betoveringsgloed + combatTooltip: Deactiveer automatisch de transparantie in een gevecht + nameTagTooltip: Laat het naamplaatje van de speler zien + showElytraTooltip: Laat Dekschild zien + shieldGlintTooltip: Betoveringsgloed laten zien op schild + openButtonTooltip: Open harnas transparantie overschrijving + deleteButtonTooltip: Verwijder transparantie overschrijving diff --git a/src/main/resources/assets/showmeyourskin/lang/ru_ru.json b/src/main/resources/assets/showmeyourskin/lang/ru_ru.json deleted file mode 100644 index 8cbb8dc..0000000 --- a/src/main/resources/assets/showmeyourskin/lang/ru_ru.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "category.showmeyourskin.showmeyourskin": "Show Me Your Skin!", - "key.showmeyourskin.open_settings": "Открыть настройки брони", - "key.showmeyourskin.global_toggle": "Переключить режим", - "key.showmeyourskin.global_toggle.enable": "§aВключить §rперсонализацию отрисовки брони.", - "key.showmeyourskin.global_toggle.disable": "§cОтключить §rперсонализацию отрисовки брони.", - "gui.showmeyourskin.armorScreen.title": "Настройка брони", - "gui.showmeyourskin.armorScreen.title.serverIntegrated": "Настройка брони (Сервер)", - "gui.showmeyourskin.armorScreen.title.serverOverrides": "Настройка брони (Локальные переопределения)", - "gui.showmeyourskin.armorScreen.globalToggleTooltip": "Переключение на общие, нажмите %1$s для внутриигрового переключения.", - "gui.showmeyourskin.armorScreen.overridesEnabled": "Включить локальные переопределения.\n(не видно другим игрокам)", - "gui.showmeyourskin.armorScreen.overridesConfigure": "Настройка локальных переопределения.\n(не видно другим игрокам)", - "gui.showmeyourskin.armorScreen.global": "Общие", - "gui.showmeyourskin.armorScreen.synced": "Синхронизировано", - "gui.showmeyourskin.armorScreen.overridden": "Переопределено", - "gui.showmeyourskin.armorScreen.playerName": "%s", - "gui.showmeyourskin.armorScreen.playerSelector": "Настройка брони", - "gui.showmeyourskin.armorScreen.piece.head": "Шлем: %d%%", - "gui.showmeyourskin.armorScreen.piece.chest": "Нагрудник: %d%%", - "gui.showmeyourskin.armorScreen.piece.legs": "Поножи: %d%%", - "gui.showmeyourskin.armorScreen.piece.feet": "Ботинки: %d%%", - "gui.showmeyourskin.armorScreen.piece.elytra": "Элитры: %d%%", - "gui.showmeyourskin.armorScreen.piece.shield": "Щит: %d%%", - "gui.showmeyourskin.armorScreen.glintTooltip": "Включить мерцание чар", - "gui.showmeyourskin.armorScreen.combatTooltip": "Автоматически отключать прозрачность в бою", - "gui.showmeyourskin.armorScreen.nameTagTooltip": "Показать тэг имени игрока", - "gui.showmeyourskin.armorScreen.showElytraTooltip": "Показать элитры", - "gui.showmeyourskin.armorScreen.shieldGlintTooltip": "Показать на щите мерцание чара", - "gui.showmeyourskin.armorScreen.openButtonTooltip": "Открыть переопределение прозрачности брони", - "gui.showmeyourskin.armorScreen.deleteButtonTooltip": "Удалить переопеределение прозрачности" -} diff --git a/src/main/resources/assets/showmeyourskin/lang/ru_ru.yml b/src/main/resources/assets/showmeyourskin/lang/ru_ru.yml new file mode 100644 index 0000000..7895ddd --- /dev/null +++ b/src/main/resources/assets/showmeyourskin/lang/ru_ru.yml @@ -0,0 +1,39 @@ +category: + showmeyourskin: + showmeyourskin: Show Me Your Skin! +key: + showmeyourskin: + open_settings: Открыть настройки брони + global_toggle: + .: Переключить режим + enable: "§aВключить §rперсонализацию отрисовки брони." + disable: "§cОтключить §rперсонализацию отрисовки брони." +gui: + showmeyourskin: + armorScreen: + title: + .: Настройка брони + serverIntegrated: Настройка брони (Сервер) + serverOverrides: Настройка брони (Локальные переопределения) + globalToggleTooltip: Переключение на общие, нажмите %1$s для внутриигрового переключения. + overridesEnabled: "Включить локальные переопределения.\n(не видно другим игрокам)" + overridesConfigure: "Настройка локальных переопределения.\n(не видно другим игрокам)" + global: Общие + synced: Синхронизировано + overridden: Переопределено + playerName: "%s" + playerSelector: Настройка брони + piece: + head: "Шлем: %d%%" + chest: "Нагрудник: %d%%" + legs: "Поножи: %d%%" + feet: "Ботинки: %d%%" + elytra: "Элитры: %d%%" + shield: "Щит: %d%%" + glintTooltip: Включить мерцание чар + combatTooltip: Автоматически отключать прозрачность в бою + nameTagTooltip: Показать тэг имени игрока + showElytraTooltip: Показать элитры + shieldGlintTooltip: Показать на щите мерцание чара + openButtonTooltip: Открыть переопределение прозрачности брони + deleteButtonTooltip: Удалить переопределение прозрачности diff --git a/src/main/resources/assets/showmeyourskin/lang/uk_ua.json b/src/main/resources/assets/showmeyourskin/lang/uk_ua.json deleted file mode 100644 index 4b25482..0000000 --- a/src/main/resources/assets/showmeyourskin/lang/uk_ua.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "category.showmeyourskin.showmeyourskin": "Show Me Your Skin!", - "key.showmeyourskin.open_settings": "Відкрити глобальні параметри", - "key.showmeyourskin.global_toggle": "Переключити Мод", - "key.showmeyourskin.global_toggle.enable": "Включена настройка рендеринга броні.", - "key.showmeyourskin.global_toggle.disable": "Відключена настройка рендеринга броні.", - "gui.showmeyourskin.armorScreen.globalToggleTooltip": "Глобальне перемикання, натисніть %1$S, щоб переключитися в грі.", - "gui.showmeyourskin.armorScreen.global": "Глобальнi параметри", - "gui.showmeyourskin.armorScreen.playerSelector": "Налаштування бронi", - "gui.showmeyourskin.armorScreen.piece.head": "Шолом: %d%%", - "gui.showmeyourskin.armorScreen.piece.chest": "Нагрудник: %d%%", - "gui.showmeyourskin.armorScreen.piece.legs": "Наголінники: %d%%", - "gui.showmeyourskin.armorScreen.piece.feet": "Чоботи: %d%%", - "gui.showmeyourskin.armorScreen.glintTooltip": "Ефект зачаровування", - "gui.showmeyourskin.armorScreen.combatTooltip": "Автоматично вимикати прозорість в бою", - "gui.showmeyourskin.armorScreen.nameTagTooltip": "Показувати нік гравця", - "gui.showmeyourskin.armorScreen.showElytraTooltip": "Показувати елітри", - "gui.showmeyourskin.armorScreen.openButtonTooltip": "Відкрити параметри прозорості броні", - "gui.showmeyourskin.armorScreen.deleteButtonTooltip": "Скинути налаштування прозорості" -} \ No newline at end of file diff --git a/src/main/resources/assets/showmeyourskin/lang/uk_ua.yml b/src/main/resources/assets/showmeyourskin/lang/uk_ua.yml new file mode 100644 index 0000000..8b5090c --- /dev/null +++ b/src/main/resources/assets/showmeyourskin/lang/uk_ua.yml @@ -0,0 +1,27 @@ +category: + showmeyourskin: + showmeyourskin: Show Me Your Skin! +key: + showmeyourskin: + open_settings: Відкрити глобальні параметри + global_toggle: + .: Переключити Мод + enable: Включена настройка рендеринга броні. + disable: Відключена настройка рендеринга броні. +gui: + showmeyourskin: + armorScreen: + globalToggleTooltip: Глобальне перемикання, натисніть %1$S, щоб переключитися в грі. + global: Глобальнi параметри + playerSelector: Налаштування бронi + piece: + head: "Шолом: %d%%" + chest: "Нагрудник: %d%%" + legs: "Наголінники: %d%%" + feet: "Чоботи: %d%%" + glintTooltip: Ефект зачаровування + combatTooltip: Автоматично вимикати прозорість в бою + nameTagTooltip: Показувати нік гравця + showElytraTooltip: Показувати елітри + openButtonTooltip: Відкрити параметри прозорості броні + deleteButtonTooltip: Скинути налаштування прозорості diff --git a/src/main/resources/assets/showmeyourskin/lang/zh_cn.json b/src/main/resources/assets/showmeyourskin/lang/zh_cn.json deleted file mode 100644 index ec409bc..0000000 --- a/src/main/resources/assets/showmeyourskin/lang/zh_cn.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "category.showmeyourskin.showmeyourskin": "Show Me Your Skin!", - "key.showmeyourskin.open_settings": "打开护甲配置", - "key.showmeyourskin.global_toggle": "调整模组", - "key.showmeyourskin.global_toggle.enable": "启用自定义护甲渲染", - "key.showmeyourskin.global_toggle.disable": "禁用自定义护甲渲染", - "gui.showmeyourskin.armorScreen.globalToggleTooltip": "全局切换,按 %1$s 在游戏中切换。", - "gui.showmeyourskin.armorScreen.global": "全局", - "gui.showmeyourskin.armorScreen.playerSelector": "护甲配置", - "gui.showmeyourskin.armorScreen.piece.head": "头盔: %d%%", - "gui.showmeyourskin.armorScreen.piece.chest": "胸甲: %d%%", - "gui.showmeyourskin.armorScreen.piece.legs": "护腿: %d%%", - "gui.showmeyourskin.armorScreen.piece.feet": "靴子: %d%%", - "gui.showmeyourskin.armorScreen.glintTooltip": "启用附魔光效", - "gui.showmeyourskin.armorScreen.combatTooltip": "在战斗中自动禁用透明", - "gui.showmeyourskin.armorScreen.nameTagTooltip": "显示玩家姓名标签", - "gui.showmeyourskin.armorScreen.showElytraTooltip": "显示鞘翅", - "gui.showmeyourskin.armorScreen.shieldGlintTooltip": "在盾牌上显示附魔光效", - "gui.showmeyourskin.armorScreen.openButtonTooltip": "打开护甲透明", - "gui.showmeyourskin.armorScreen.deleteButtonTooltip": "删除透明" -} diff --git a/src/main/resources/assets/showmeyourskin/lang/zh_cn.yml b/src/main/resources/assets/showmeyourskin/lang/zh_cn.yml new file mode 100644 index 0000000..da0fc90 --- /dev/null +++ b/src/main/resources/assets/showmeyourskin/lang/zh_cn.yml @@ -0,0 +1,28 @@ +category: + showmeyourskin: + showmeyourskin: Show Me Your Skin! +key: + showmeyourskin: + open_settings: 打开护甲配置 + global_toggle: + .: 调整模组 + enable: 启用自定义护甲渲染 + disable: 禁用自定义护甲渲染 +gui: + showmeyourskin: + armorScreen: + globalToggleTooltip: 全局切换,按 %1$s 在游戏中切换。 + global: 全局 + playerSelector: 护甲配置 + piece: + head: "头盔: %d%%" + chest: "胸甲: %d%%" + legs: "护腿: %d%%" + feet: "靴子: %d%%" + glintTooltip: 启用附魔光效 + combatTooltip: 在战斗中自动禁用透明 + nameTagTooltip: 显示玩家姓名标签 + showElytraTooltip: 显示鞘翅 + shieldGlintTooltip: 在盾牌上显示附魔光效 + openButtonTooltip: 打开护甲透明 + deleteButtonTooltip: 删除透明 diff --git a/src/main/resources/assets/showmeyourskin/textures/gui/sprites/button/force_elytra_when_flying.png b/src/main/resources/assets/showmeyourskin/textures/gui/sprites/button/force_elytra_when_flying.png new file mode 100644 index 0000000..fe78a6b Binary files /dev/null and b/src/main/resources/assets/showmeyourskin/textures/gui/sprites/button/force_elytra_when_flying.png differ diff --git a/src/main/resources/assets/showmeyourskin/textures/gui/sprites/button/force_elytra_when_flying_disabled.png b/src/main/resources/assets/showmeyourskin/textures/gui/sprites/button/force_elytra_when_flying_disabled.png new file mode 100644 index 0000000..8b8bda3 Binary files /dev/null and b/src/main/resources/assets/showmeyourskin/textures/gui/sprites/button/force_elytra_when_flying_disabled.png differ diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 6418eb7..9cf856f 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -9,7 +9,7 @@ "enjarai" ], "contact": { - "homepage": "https://enjarai.nl/", + "homepage": "https://enjarai.dev/", "sources": "https://github.com/enjarai/show-me-your-skin", "issues": "https://github.com/enjarai/show-me-your-skin/issues" }, @@ -46,7 +46,7 @@ "fabricloader": ">=0.15.0", "fabric-api": "*", "minecraft": ">=1.20.2 <=1.20.2", - "cicada": ">=0.6.0 <1.0.0", + "cicada": ">=0.7.0 <1.0.0", "cardinal-components-base": "*", "cardinal-components-entity": "*" },