change mod names and package
This commit is contained in:
@ -8,10 +8,10 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
loader_version=0.10.8
|
loader_version=0.10.8
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.1.0
|
mod_version = 1.0
|
||||||
maven_group = net.autoreconnect
|
maven_group = de.mrgeorgen.wolfSignal
|
||||||
archives_base_name = autoreconnect
|
archives_base_name = wolfSignal
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
fabric_version=0.29.2+1.16
|
fabric_version=0.29.2+1.16
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package net.autoreconnect;
|
package de.mrgeorgen.wolfSignal;
|
||||||
|
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
import com.mojang.brigadier.arguments.ArgumentType;
|
import com.mojang.brigadier.arguments.ArgumentType;
|
||||||
@ -8,7 +8,7 @@ import net.minecraft.client.network.ClientCommandSource;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
import static net.autoreconnect.AutoReconnect.MOD_ID;
|
import static de.mrgeorgen.wolfSignal.Main.MOD_ID;
|
||||||
|
|
||||||
public final class ClientCommands
|
public final class ClientCommands
|
||||||
{
|
{
|
||||||
@ -44,4 +44,4 @@ public final class ClientCommands
|
|||||||
{
|
{
|
||||||
commands.stream().map(literal(MOD_ID)::then).forEach(dispatcher::register);
|
commands.stream().map(literal(MOD_ID)::then).forEach(dispatcher::register);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package net.autoreconnect;
|
package de.mrgeorgen.wolfSignal;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.JsonParseException;
|
import com.google.gson.JsonParseException;
|
||||||
@ -19,14 +19,14 @@ import java.util.Optional;
|
|||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
import static com.mojang.brigadier.Command.SINGLE_SUCCESS;
|
||||||
import static net.autoreconnect.ClientCommands.*;
|
import static de.mrgeorgen.wolfSignal.ClientCommands.*;
|
||||||
import static net.autoreconnect.Util.*;
|
import static de.mrgeorgen.wolfSignal.Util.*;
|
||||||
import static net.minecraft.command.arguments.NbtTagArgumentType.nbtTag;
|
import static net.minecraft.command.arguments.NbtTagArgumentType.nbtTag;
|
||||||
import static net.minecraft.util.Formatting.*;
|
import static net.minecraft.util.Formatting.*;
|
||||||
|
|
||||||
public class AutoReconnect implements ModInitializer
|
public class Main implements ModInitializer
|
||||||
{
|
{
|
||||||
public static final String MOD_ID = "autoreconnect";
|
public static final String MOD_ID = "wolfsignal";
|
||||||
public static int[] delayList = { 3, 10, 30, 60 };
|
public static int[] delayList = { 3, 10, 30, 60 };
|
||||||
public static int ticks = -1;
|
public static int ticks = -1;
|
||||||
public static int attempt = -1;
|
public static int attempt = -1;
|
||||||
@ -36,8 +36,8 @@ public class AutoReconnect implements ModInitializer
|
|||||||
@Override
|
@Override
|
||||||
public void onInitialize()
|
public void onInitialize()
|
||||||
{
|
{
|
||||||
ClientCommands.register(literal("reload").executes(AutoReconnect::cmdReload));
|
ClientCommands.register(literal("reload").executes(Main::cmdReload));
|
||||||
ClientCommands.register(literal("config").then(argument("delayList", nbtTag()).executes(AutoReconnect::cmdConfig)));
|
ClientCommands.register(literal("config").then(argument("delayList", nbtTag()).executes(Main::cmdConfig)));
|
||||||
loadConfig();
|
loadConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ public class AutoReconnect implements ModInitializer
|
|||||||
// if null or empty or contains negatives or zeros
|
// if null or empty or contains negatives or zeros
|
||||||
if (delayList == null || delayList.length == 0 || IntStream.of(delayList).anyMatch(i -> i <= 0))
|
if (delayList == null || delayList.length == 0 || IntStream.of(delayList).anyMatch(i -> i <= 0))
|
||||||
throw new IllegalArgumentException("delayList must be a non-empty list of strictly positive integers");
|
throw new IllegalArgumentException("delayList must be a non-empty list of strictly positive integers");
|
||||||
AutoReconnect.delayList = delayList;
|
Main.delayList = delayList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void resetAttempts()
|
public static void resetAttempts()
|
||||||
@ -123,4 +123,4 @@ public class AutoReconnect implements ModInitializer
|
|||||||
{
|
{
|
||||||
return Optional.of(attempt < 0 ? RED : GREEN).filter(Formatting::isColor).map(Formatting::getColorValue).orElse(0xFFFFFF);
|
return Optional.of(attempt < 0 ? RED : GREEN).filter(Formatting::isColor).map(Formatting::getColorValue).orElse(0xFFFFFF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package net.autoreconnect;
|
package de.mrgeorgen.wolfSignal;
|
||||||
|
|
||||||
import net.minecraft.SharedConstants;
|
import net.minecraft.SharedConstants;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
@ -52,4 +52,4 @@ public class Util
|
|||||||
{
|
{
|
||||||
return colored(ex.getClass().getSimpleName() + ": " + ex.getLocalizedMessage(), RED);
|
return colored(ex.getClass().getSimpleName() + ": " + ex.getLocalizedMessage(), RED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,8 +1,8 @@
|
|||||||
package net.autoreconnect.mixin;
|
package de.mrgeorgen.wolfSignal.mixin;
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
import com.mojang.brigadier.CommandDispatcher;
|
import com.mojang.brigadier.CommandDispatcher;
|
||||||
import net.autoreconnect.ClientCommands;
|
import de.mrgeorgen.wolfSignal.ClientCommands;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.client.network.ClientCommandSource;
|
import net.minecraft.client.network.ClientCommandSource;
|
||||||
@ -37,4 +37,4 @@ public class MixinClientPlayNetworkHandler
|
|||||||
// register commands to the new dispatcher
|
// register commands to the new dispatcher
|
||||||
ClientCommands.register((CommandDispatcher<ClientCommandSource>) (Object) commandDispatcher);
|
ClientCommands.register((CommandDispatcher<ClientCommandSource>) (Object) commandDispatcher);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package net.autoreconnect.mixin;
|
package de.mrgeorgen.wolfSignal.mixin;
|
||||||
|
|
||||||
import net.autoreconnect.ClientCommands;
|
import de.mrgeorgen.wolfSignal.ClientCommands;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.network.ClientCommandSource;
|
import net.minecraft.client.network.ClientCommandSource;
|
||||||
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
import net.minecraft.client.network.ClientPlayNetworkHandler;
|
||||||
@ -12,8 +12,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
import static net.autoreconnect.Util.err;
|
import static de.mrgeorgen.wolfSignal.Util.err;
|
||||||
import static net.autoreconnect.Util.send;
|
import static de.mrgeorgen.wolfSignal.Util.send;
|
||||||
|
|
||||||
@Mixin(ClientPlayerEntity.class)
|
@Mixin(ClientPlayerEntity.class)
|
||||||
public abstract class MixinClientPlayerEntity
|
public abstract class MixinClientPlayerEntity
|
||||||
@ -46,4 +46,4 @@ public abstract class MixinClientPlayerEntity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package net.autoreconnect.mixin;
|
package de.mrgeorgen.wolfSignal.mixin;
|
||||||
|
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.font.TextRenderer;
|
import net.minecraft.client.font.TextRenderer;
|
||||||
@ -12,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
|||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
import static net.autoreconnect.AutoReconnect.*;
|
import static de.mrgeorgen.wolfSignal.Main.*;
|
||||||
|
|
||||||
@Mixin(DisconnectedScreen.class)
|
@Mixin(DisconnectedScreen.class)
|
||||||
public class MixinDisconnectedScreen
|
public class MixinDisconnectedScreen
|
||||||
@ -39,4 +39,4 @@ public class MixinDisconnectedScreen
|
|||||||
(window.getScaledHeight() - reasonHeight) / 2F - 9 * 4, // 9 * 2 higher than the title which is 9 * 2 higher than the disconnect reason
|
(window.getScaledHeight() - reasonHeight) / 2F - 9 * 4, // 9 * 2 higher than the title which is 9 * 2 higher than the disconnect reason
|
||||||
getColor());
|
getColor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package net.autoreconnect.mixin;
|
package de.mrgeorgen.wolfSignal.mixin;
|
||||||
|
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.gui.screen.*;
|
import net.minecraft.client.gui.screen.*;
|
||||||
@ -10,8 +10,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
import static net.autoreconnect.AutoReconnect.*;
|
import static de.mrgeorgen.wolfSignal.Main.*;
|
||||||
import static net.autoreconnect.Util.log;
|
import static de.mrgeorgen.wolfSignal.Util.log;
|
||||||
|
|
||||||
@Mixin(MinecraftClient.class)
|
@Mixin(MinecraftClient.class)
|
||||||
public class MixinMinecraftClient
|
public class MixinMinecraftClient
|
||||||
@ -77,4 +77,4 @@ public class MixinMinecraftClient
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,17 +1,16 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"id": "autoreconnect",
|
"id": "wolfsignal",
|
||||||
"version": "1.1.0",
|
"version": "1.0",
|
||||||
|
|
||||||
"name": "AutoReconnect",
|
"name": "Wolf Signal",
|
||||||
"description": "This mod will automatically try to reconnect you back to a server if you got disconnected.\nBy default, it will make 4 attempts after 3, 10, 30 and 60 seconds.",
|
"description": "send redstone signals thrpugh wolfs",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Bstn1802"
|
"MrGeorgen"
|
||||||
],
|
],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://www.curseforge.com/minecraft/mc-mods/autoreconnect",
|
"homepage": "https://git.redstoneunion.de/MrGeorgen/wolf-signal",
|
||||||
"sources": "https://github.com/Bstn1802/AutoReconnect",
|
"sources": "https://git.redstoneunion.de/MrGeorgen/wolf-signal"
|
||||||
"issues": "https://github.com/Bstn1802/AutoReconnect/issues"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"license": "CC0-1.0",
|
"license": "CC0-1.0",
|
||||||
@ -20,11 +19,11 @@
|
|||||||
"environment": "client",
|
"environment": "client",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"main": [
|
"main": [
|
||||||
"net.autoreconnect.AutoReconnect"
|
"de.mrgeorgen.wolfSignal.Main"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"autoreconnect.mixins.json"
|
"wolfsignal.mixins.json"
|
||||||
],
|
],
|
||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"minVersion": "0.8",
|
"minVersion": "0.8",
|
||||||
"package": "net.autoreconnect.mixin",
|
"package": "de.mrgeorgen.wolfSignal.mixin",
|
||||||
"compatibilityLevel": "JAVA_8",
|
"compatibilityLevel": "JAVA_8",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
],
|
],
|
||||||
Reference in New Issue
Block a user