mirror of
https://github.com/TeamMidnightDust/BlinkingSkinPort.git
synced 2025-12-13 09:25:10 +01:00
BlinkingSkinPort 2.2.0 - Port to 1.20
- Update to 1.20 - Make use of new MidnightLib features for better config screen
This commit is contained in:
@@ -2,17 +2,15 @@
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.19
|
||||
yarn_mappings=1.19+build.4
|
||||
loader_version=0.14.8
|
||||
minecraft_version=1.20
|
||||
yarn_mappings=1.20+build.1
|
||||
loader_version=0.14.21
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 2.1.1
|
||||
maven_group = eu.midnightdust
|
||||
archives_base_name = blinkingskinport
|
||||
mod_version = 2.2.0
|
||||
maven_group = eu.midnightdust
|
||||
archives_base_name = blinkingskinport
|
||||
|
||||
# Dependencies
|
||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||
fabric_version=0.56.0+1.19
|
||||
midnightlib_version=0.5.2
|
||||
fabric_version=0.83.0+1.20
|
||||
midnightlib_version=1.4.1-fabric
|
||||
|
||||
@@ -15,14 +15,14 @@ public class BlinkingSkinClient implements ClientModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
BlinkingSkinConfig.init("blinkingskinport",BlinkingSkinConfig.class);
|
||||
BlinkingSkinConfig.init("blinkingskinport", BlinkingSkinConfig.class);
|
||||
|
||||
for (PlayerModelPart part : PlayerModelPart.values()) {
|
||||
this.intervals.put(part, 0);
|
||||
}
|
||||
|
||||
ClientTickEvents.END_CLIENT_TICK.register(client -> {
|
||||
if (BlinkingSkinConfig.enabled && (BlinkingSkinConfig.player.equals("") || client.getSession().getUsername().equals(BlinkingSkinConfig.player))) {
|
||||
if (BlinkingSkinConfig.enabled && (BlinkingSkinConfig.playerAllowList.isEmpty() || BlinkingSkinConfig.playerAllowList.contains(client.getSession().getUsername()))) {
|
||||
if (client.getCurrentServerEntry() != null && BlinkingSkinConfig.isBlocklisted(client.getCurrentServerEntry().address)) return;
|
||||
for (Map.Entry<PlayerModelPart,Integer> interval : this.intervals.entrySet()) {
|
||||
if (!BlinkingSkinConfig.isEnabled(interval.getKey())) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package eu.midnightdust.blinkingskinport.config;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import eu.midnightdust.lib.config.MidnightConfig;
|
||||
import net.minecraft.client.render.entity.PlayerModelPart;
|
||||
|
||||
@@ -8,31 +9,31 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class BlinkingSkinConfig extends MidnightConfig {
|
||||
public static final String general = "general";
|
||||
public static final String parts = "parts";
|
||||
public static final String intervals = "intervals";
|
||||
|
||||
@Entry public static boolean enabled = false;
|
||||
@Entry(category = general) public static boolean enabled = false;
|
||||
|
||||
@Entry public static String player = ""; // Optional: Only enable the mod when the name matches the currently active account. Useful for users with multiple minecraft accounts
|
||||
@Entry public static List<String> serverBlocklist = new ArrayList<>();
|
||||
@Entry public static boolean useBlocklistAsAllowlist = false;
|
||||
|
||||
@Comment public static Comment spacer;
|
||||
@Entry public static boolean capeEnabled = true;
|
||||
@Entry public static boolean hatEnabled = true;
|
||||
@Entry public static boolean jacketEnabled = true;
|
||||
@Entry public static boolean leftSleeveEnabled = true;
|
||||
@Entry public static boolean rightSleeveEnabled = true;
|
||||
@Entry public static boolean leftPantsLegEnabled = true;
|
||||
@Entry public static boolean rightPantsLegEnabled = true;
|
||||
@Comment public static Comment spacer2;
|
||||
@Comment public static Comment disclaimer; // Blink Intervals lower than 5 are disabled, because they can be used to trigger epileptic episodes, which isn't fun for affected people!
|
||||
@Comment public static Comment disclaimer2;
|
||||
@Entry(min = 5, max = 1000) public static int capeBlinkInterval = 20;
|
||||
@Entry(min = 5, max = 1000) public static int hatBlinkInterval = 20;
|
||||
@Entry(min = 5, max = 1000) public static int jacketBlinkInterval = 20;
|
||||
@Entry(min = 5, max = 1000) public static int leftSleeveBlinkInterval = 20;
|
||||
@Entry(min = 5, max = 1000) public static int rightSleeveBlinkInterval = 20;
|
||||
@Entry(min = 5, max = 1000) public static int leftPantsLegBlinkInterval = 20;
|
||||
@Entry(min = 5, max = 1000) public static int rightPantsLegBlinkInterval = 20;
|
||||
@Entry(category = general) @Hidden public static String player = "";
|
||||
@Entry(category = general) public static List<String> playerAllowList = Lists.newArrayList(player); // Optional: Only enable the mod when one of the names matches the currently active account. Useful for users with multiple minecraft accounts
|
||||
@Entry(category = general) public static List<String> serverBlocklist = new ArrayList<>();
|
||||
@Entry(category = general) public static boolean useBlocklistAsAllowlist = false;
|
||||
@Entry(category = parts) public static boolean capeEnabled = true;
|
||||
@Entry(category = parts) public static boolean hatEnabled = true;
|
||||
@Entry(category = parts) public static boolean jacketEnabled = true;
|
||||
@Entry(category = parts) public static boolean leftSleeveEnabled = true;
|
||||
@Entry(category = parts) public static boolean rightSleeveEnabled = true;
|
||||
@Entry(category = parts) public static boolean leftPantsLegEnabled = true;
|
||||
@Entry(category = parts) public static boolean rightPantsLegEnabled = true;
|
||||
@Comment(category = intervals) public static Comment disclaimer; // Blink Intervals lower than 5 are disabled, because they could trigger epileptic episodes, which isn't fun for affected people!
|
||||
@Entry(category = intervals, min = 5, max = 250, isSlider = true) public static int capeBlinkInterval = 20;
|
||||
@Entry(category = intervals, min = 5, max = 250, isSlider = true) public static int hatBlinkInterval = 20;
|
||||
@Entry(category = intervals, min = 5, max = 250, isSlider = true) public static int jacketBlinkInterval = 20;
|
||||
@Entry(category = intervals, min = 5, max = 250, isSlider = true) public static int leftSleeveBlinkInterval = 20;
|
||||
@Entry(category = intervals, min = 5, max = 250, isSlider = true) public static int rightSleeveBlinkInterval = 20;
|
||||
@Entry(category = intervals, min = 5, max = 250, isSlider = true) public static int leftPantsLegBlinkInterval = 20;
|
||||
@Entry(category = intervals, min = 5, max = 250, isSlider = true) public static int rightPantsLegBlinkInterval = 20;
|
||||
|
||||
public static boolean isEnabled(PlayerModelPart part) {
|
||||
return switch (part) {
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
{
|
||||
"blinkingskinport.midnightconfig.title":"BlinkingSkinPort Config",
|
||||
|
||||
"blinkingskinport.midnightconfig.category.general":"General",
|
||||
"blinkingskinport.midnightconfig.category.parts":"Parts",
|
||||
"blinkingskinport.midnightconfig.category.intervals":"Intervals",
|
||||
|
||||
"blinkingskinport.midnightconfig.enabled":"Enable Mod",
|
||||
"blinkingskinport.midnightconfig.player":"Enabled Account Name",
|
||||
"blinkingskinport.midnightconfig.player.tooltip":"Optional. For multi-account users.",
|
||||
"blinkingskinport.midnightconfig.playerAllowList":"Enabled Account Names",
|
||||
"blinkingskinport.midnightconfig.playerAllowList.tooltip":"Optional. For multi-account users.",
|
||||
"blinkingskinport.midnightconfig.serverBlocklist":"Server Blocklist",
|
||||
"blinkingskinport.midnightconfig.useBlocklistAsAllowlist":"Use Blocklist as Allowlist",
|
||||
|
||||
"blinkingskinport.midnightconfig.spacer":"",
|
||||
|
||||
"blinkingskinport.midnightconfig.capeEnabled":"Blink Cape",
|
||||
"blinkingskinport.midnightconfig.hatEnabled":"Blink Hat",
|
||||
"blinkingskinport.midnightconfig.jacketEnabled":"Blink Jacket",
|
||||
@@ -16,9 +19,7 @@
|
||||
"blinkingskinport.midnightconfig.leftPantsLegEnabled":"Blink Left Pants",
|
||||
"blinkingskinport.midnightconfig.rightPantsLegEnabled":"Blink Right Pants",
|
||||
|
||||
"blinkingskinport.midnightconfig.spacer2":"",
|
||||
"blinkingskinport.midnightconfig.disclaimer":"§cBlink Intervals lower than 5 are disabled, because they could",
|
||||
"blinkingskinport.midnightconfig.disclaimer2":"§ctrigger epileptic seizures, which isn't fun for affected people!",
|
||||
"blinkingskinport.midnightconfig.disclaimer":"§cBlink Intervals lower than 5 are disabled, because they could trigger epileptic seizures, which isn't fun for affected people!",
|
||||
"blinkingskinport.midnightconfig.capeBlinkInterval":"Cape Blink Interval",
|
||||
"blinkingskinport.midnightconfig.capeBlinkInterval.tooltip":"§2(20 ticks = 1 second)",
|
||||
"blinkingskinport.midnightconfig.hatBlinkInterval":"Hat Blink Interval",
|
||||
|
||||
Reference in New Issue
Block a user