Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9159dff6ad | ||
|
|
0fbb447f7a | ||
|
|
e07e8ab1da | ||
|
|
35820562be | ||
|
|
0fe333b7be | ||
|
|
b46282d294 | ||
|
|
8ca683768a | ||
|
|
c8c7699d9e | ||
|
|
95962939a2 | ||
|
|
97f52e650b | ||
|
|
21e85da3fd | ||
|
|
5c9aa323e0 | ||
|
|
f40ecc1b6a |
@@ -80,14 +80,33 @@ jobs:
|
|||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
CHANGELOG: ${{ steps.changelog.outputs.changelog }}
|
||||||
run: |
|
run: |
|
||||||
gh release create "${{ inputs.version }}" \
|
VERSION="${{ inputs.version }}"
|
||||||
--title "${{ inputs.version }}" \
|
REPO="${{ github.repository }}"
|
||||||
--notes "${{ steps.changelog.outputs.changelog }}" \
|
DOWNLOAD_URL="https://github.com/${REPO}/releases/download/${VERSION}"
|
||||||
mc-1.21.8/build/libs/anarchymod-mc-1.21.8-${{ inputs.version }}.jar \
|
|
||||||
mc-1.21.9/build/libs/anarchymod-mc-1.21.9-${{ inputs.version }}.jar \
|
NOTES=$(cat <<EOF
|
||||||
mc-1.21.10/build/libs/anarchymod-mc-1.21.10-${{ inputs.version }}.jar \
|
## Downloads
|
||||||
mc-1.21.11/build/libs/anarchymod-mc-1.21.11-${{ inputs.version }}.jar
|
|
||||||
|
| Minecraft Version | Download |
|
||||||
|
|---|---|
|
||||||
|
| 1.21.8 | [\`anarchymod-mc-1.21.8-${VERSION}.jar\`](${DOWNLOAD_URL}/anarchymod-mc-1.21.8-${VERSION}.jar) |
|
||||||
|
| 1.21.9 | [\`anarchymod-mc-1.21.9-${VERSION}.jar\`](${DOWNLOAD_URL}/anarchymod-mc-1.21.9-${VERSION}.jar) |
|
||||||
|
| 1.21.10 | [\`anarchymod-mc-1.21.10-${VERSION}.jar\`](${DOWNLOAD_URL}/anarchymod-mc-1.21.10-${VERSION}.jar) |
|
||||||
|
| 1.21.11 | [\`anarchymod-mc-1.21.11-${VERSION}.jar\`](${DOWNLOAD_URL}/anarchymod-mc-1.21.11-${VERSION}.jar) |
|
||||||
|
|
||||||
|
${CHANGELOG}
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
|
||||||
|
gh release create "${VERSION}" \
|
||||||
|
--title "AnarchyMod ${VERSION}" \
|
||||||
|
--notes "${NOTES}" \
|
||||||
|
mc-1.21.8/build/libs/anarchymod-mc-1.21.8-${VERSION}.jar \
|
||||||
|
mc-1.21.9/build/libs/anarchymod-mc-1.21.9-${VERSION}.jar \
|
||||||
|
mc-1.21.10/build/libs/anarchymod-mc-1.21.10-${VERSION}.jar \
|
||||||
|
mc-1.21.11/build/libs/anarchymod-mc-1.21.11-${VERSION}.jar
|
||||||
|
|
||||||
set-after-version:
|
set-after-version:
|
||||||
needs: build
|
needs: build
|
||||||
|
|||||||
+29
-9
@@ -1,14 +1,34 @@
|
|||||||
.gradle/
|
# Compiled plugin files
|
||||||
build/
|
target/
|
||||||
out/
|
|
||||||
|
|
||||||
|
# IDE files
|
||||||
.idea/
|
.idea/
|
||||||
|
.vscode/*
|
||||||
|
.settings/*
|
||||||
|
.classpath
|
||||||
|
.project
|
||||||
|
.factorypath
|
||||||
|
|
||||||
|
# UML
|
||||||
|
*.plantuml
|
||||||
|
|
||||||
|
# Gradle
|
||||||
|
.kotlin
|
||||||
|
.gradle
|
||||||
|
**/build/
|
||||||
|
!src/**/build/
|
||||||
|
|
||||||
|
# Ignore Gradle GUI config
|
||||||
|
gradle-app.setting
|
||||||
|
|
||||||
|
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||||
|
!gradle-wrapper.jar
|
||||||
|
|
||||||
|
# Cache of project
|
||||||
|
.gradletasknamecache
|
||||||
|
|
||||||
*.iml
|
*.iml
|
||||||
*.ipr
|
|
||||||
*.iws
|
*.iws
|
||||||
|
*.ipr
|
||||||
|
|
||||||
.vscode/
|
**/run/
|
||||||
|
|
||||||
.DS_Store
|
|
||||||
.kotlin/
|
|
||||||
!gradle/wrapper/gradle-wrapper.jar
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
[](https://github.com/6b6t/AnarchyMod/actions/workflows/build.yml)
|
[](https://github.com/6b6t/AnarchyMod/actions/workflows/build.yml)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
|
|
||||||
🔓 Client-side Fabric mod for anarchy Minecraft servers — unblocks servers and auto-adds 6b6t to the server list.
|
🔓 Bypass a potential Mojang blacklist of 6b6t - the biggest anarchy server in the world.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "net.blockhost"
|
group = "net.blockhost"
|
||||||
version = "1.0.0"
|
version = "1.0.2"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -8,54 +8,57 @@ import java.net.URI;
|
|||||||
import java.net.http.HttpClient;
|
import java.net.http.HttpClient;
|
||||||
import java.net.http.HttpRequest;
|
import java.net.http.HttpRequest;
|
||||||
import java.net.http.HttpResponse;
|
import java.net.http.HttpResponse;
|
||||||
|
import java.time.Duration;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class Domains {
|
public class Domains {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = Logger.getLogger("AnarchyMod-Domains");
|
||||||
private static final String DOMAINS_URL = "https://www.6b6t.org/api/anarchy-mod.json";
|
private static final String DOMAINS_URL = "https://www.6b6t.org/api/anarchy-mod.json";
|
||||||
|
|
||||||
private static final Set<String> DEFAULT = Set.of(
|
private static final Set<String> DEFAULT = Set.of(
|
||||||
"*.6b6t.org", "*.10b10t.org", "*.6b6t.cc", "*.6b6t.me",
|
"*.6b6t.org", "*.10b10t.org", "*.6b6t.cc", "*.6b6t.me",
|
||||||
"*.7b7t.me", "*.8b8t.org", "*.alacity.net",
|
"*.7b7t.me", "*.8b8t.org", "*.alacity.net",
|
||||||
"*.anarchypvp.pw", "*.l2x9.org", "*.simpleanarchy.org"
|
"*.anarchypvp.pw", "*.l2x9.org", "*.simpleanarchy.org"
|
||||||
);
|
);
|
||||||
|
|
||||||
private static final Set<String> domains = new HashSet<>();
|
private static final Set<String> domains = new HashSet<>();
|
||||||
private static final Gson gson = new Gson();
|
private static final Gson gson = new Gson();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
DEFAULT.forEach(d -> domains.add(d.toLowerCase()));
|
DEFAULT.forEach(d -> domains.add(d.toLowerCase(Locale.ROOT)));
|
||||||
loadRemote();
|
loadRemote();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void loadRemote() {
|
private static void loadRemote() {
|
||||||
try {
|
try (HttpClient client = HttpClient.newHttpClient()) {
|
||||||
HttpClient client = HttpClient.newHttpClient();
|
|
||||||
HttpRequest request = HttpRequest.newBuilder()
|
HttpRequest request = HttpRequest.newBuilder()
|
||||||
.uri(URI.create(DOMAINS_URL))
|
.uri(URI.create(DOMAINS_URL))
|
||||||
.GET()
|
.timeout(Duration.ofSeconds(15))
|
||||||
.build();
|
.GET()
|
||||||
|
.build();
|
||||||
|
|
||||||
HttpResponse<String> response =
|
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
||||||
client.send(request, HttpResponse.BodyHandlers.ofString());
|
|
||||||
|
|
||||||
JsonObject json = gson.fromJson(response.body(), JsonObject.class);
|
JsonObject json = gson.fromJson(response.body(), JsonObject.class);
|
||||||
JsonArray array = json.getAsJsonArray("domains");
|
JsonArray array = json.getAsJsonArray("domains");
|
||||||
if (array == null) return;
|
if (array == null) return;
|
||||||
|
|
||||||
array.forEach(element ->
|
array.forEach(element ->
|
||||||
domains.add(element.getAsString().toLowerCase())
|
domains.add(element.getAsString().toLowerCase(Locale.ROOT))
|
||||||
);
|
);
|
||||||
|
} catch (Throwable t) {
|
||||||
} catch (Exception ignored) {
|
LOGGER.warning("Failed to load domains from remote, using defaults: " + t.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean contains(String input) {
|
public static boolean contains(String input) {
|
||||||
if (input == null) return false;
|
if (input == null) return false;
|
||||||
|
|
||||||
String domain = input.toLowerCase();
|
String domain = input.toLowerCase(Locale.ROOT);
|
||||||
|
|
||||||
if (domain.startsWith("*.")) {
|
if (domain.startsWith("*.")) {
|
||||||
domain = domain.substring(2);
|
domain = domain.substring(2);
|
||||||
@@ -67,7 +70,6 @@ public class Domains {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (String entry : domains) {
|
for (String entry : domains) {
|
||||||
|
|
||||||
if (entry.startsWith("*.")) {
|
if (entry.startsWith("*.")) {
|
||||||
String base = entry.substring(2);
|
String base = entry.substring(2);
|
||||||
if (domain.equals(base) || domain.endsWith("." + base)) {
|
if (domain.equals(base) || domain.endsWith("." + base)) {
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 292 B |
@@ -17,6 +17,12 @@ base {
|
|||||||
repositories {
|
repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
resources.srcDir(project(":common").sourceSets["main"].resources.srcDirs)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft("com.mojang:minecraft:$minecraftVersion")
|
minecraft("com.mojang:minecraft:$minecraftVersion")
|
||||||
mappings(loom.officialMojangMappings())
|
mappings(loom.officialMojangMappings())
|
||||||
@@ -25,11 +31,6 @@ dependencies {
|
|||||||
implementation(project(":common"))
|
implementation(project(":common"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Jar>("jar") {
|
|
||||||
dependsOn(project(":common").tasks.named("classes"))
|
|
||||||
from(project(":common").sourceSets["main"].output)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
inputs.property("version", project.version)
|
inputs.property("version", project.version)
|
||||||
inputs.property("minecraft_version", minecraftVersion)
|
inputs.property("minecraft_version", minecraftVersion)
|
||||||
@@ -57,6 +58,8 @@ java {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
|
dependsOn(project(":common").tasks.named("classes"))
|
||||||
|
from(project(":common").sourceSets["main"].output.classesDirs)
|
||||||
from("LICENSE") {
|
from("LICENSE") {
|
||||||
rename { "${it}_${base.archivesName.get()}" }
|
rename { "${it}_${base.archivesName.get()}" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
@Mixin(BlockedServers.class)
|
@Mixin(BlockedServers.class)
|
||||||
public class BlockedServersMixin {
|
public class BlockedServersMixin {
|
||||||
|
|
||||||
@Inject(method = "isBlockedServerHostName", at = @At("TAIL"), cancellable = true, remap = false)
|
@Inject(method = "isBlockedServerHostName", at = @At("RETURN"), cancellable = true, remap = false)
|
||||||
public void isBlockedServerHostName(String server, CallbackInfoReturnable<Boolean> cir) {
|
public void isBlockedServerHostName(String server, CallbackInfoReturnable<Boolean> cir) {
|
||||||
boolean contains = Domains.contains(server);
|
boolean contains = Domains.contains(server);
|
||||||
if (contains) {
|
if (contains) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class ServerListMixin {
|
|||||||
@Final
|
@Final
|
||||||
private List<ServerData> serverList;
|
private List<ServerData> serverList;
|
||||||
|
|
||||||
@Inject(method = "load", at = @At("TAIL"))
|
@Inject(method = "load", at = @At("RETURN"))
|
||||||
public void afterLoad(CallbackInfo ci) {
|
public void afterLoad(CallbackInfo ci) {
|
||||||
if (serverList.stream().noneMatch(data -> Domains.contains(data.ip))) {
|
if (serverList.stream().noneMatch(data -> Domains.contains(data.ip))) {
|
||||||
serverList.addFirst(new ServerData("6b6t", "6b6t.org", ServerData.Type.OTHER));
|
serverList.addFirst(new ServerData("6b6t", "6b6t.org", ServerData.Type.OTHER));
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"id": "anarchymod",
|
"id": "anarchymod",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"name": "AnarchyMod",
|
"name": "AnarchyMod",
|
||||||
"description": "Client-side mod for anarchy Minecraft servers",
|
"description": "Bypass a potential Mojang blacklist of 6b6t - the biggest anarchy server in the world.",
|
||||||
"authors": ["6b6t"],
|
"authors": ["6b6t"],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://6b6t.org",
|
"homepage": "https://6b6t.org",
|
||||||
@@ -21,6 +21,13 @@
|
|||||||
"mixins": [
|
"mixins": [
|
||||||
"anarchymod.mixins.json"
|
"anarchymod.mixins.json"
|
||||||
],
|
],
|
||||||
|
"custom": {
|
||||||
|
"modmenu": {
|
||||||
|
"links": {
|
||||||
|
"modmenu.discord": "https://6b6t.org/discord"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"fabricloader": ">=${loader_version}",
|
"fabricloader": ">=${loader_version}",
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ base {
|
|||||||
repositories {
|
repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
resources.srcDir(project(":common").sourceSets["main"].resources.srcDirs)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft("com.mojang:minecraft:$minecraftVersion")
|
minecraft("com.mojang:minecraft:$minecraftVersion")
|
||||||
mappings(loom.officialMojangMappings())
|
mappings(loom.officialMojangMappings())
|
||||||
@@ -25,11 +31,6 @@ dependencies {
|
|||||||
implementation(project(":common"))
|
implementation(project(":common"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Jar>("jar") {
|
|
||||||
dependsOn(project(":common").tasks.named("classes"))
|
|
||||||
from(project(":common").sourceSets["main"].output)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
inputs.property("version", project.version)
|
inputs.property("version", project.version)
|
||||||
inputs.property("minecraft_version", minecraftVersion)
|
inputs.property("minecraft_version", minecraftVersion)
|
||||||
@@ -57,6 +58,8 @@ java {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
|
dependsOn(project(":common").tasks.named("classes"))
|
||||||
|
from(project(":common").sourceSets["main"].output.classesDirs)
|
||||||
from("LICENSE") {
|
from("LICENSE") {
|
||||||
rename { "${it}_${base.archivesName.get()}" }
|
rename { "${it}_${base.archivesName.get()}" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
@Mixin(BlockedServers.class)
|
@Mixin(BlockedServers.class)
|
||||||
public class BlockedServersMixin {
|
public class BlockedServersMixin {
|
||||||
|
|
||||||
@Inject(method = "isBlockedServerHostName", at = @At("TAIL"), cancellable = true, remap = false)
|
@Inject(method = "isBlockedServerHostName", at = @At("RETURN"), cancellable = true, remap = false)
|
||||||
public void isBlockedServerHostName(String server, CallbackInfoReturnable<Boolean> cir) {
|
public void isBlockedServerHostName(String server, CallbackInfoReturnable<Boolean> cir) {
|
||||||
boolean contains = Domains.contains(server);
|
boolean contains = Domains.contains(server);
|
||||||
if (contains) {
|
if (contains) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class ServerListMixin {
|
|||||||
@Final
|
@Final
|
||||||
private List<ServerData> serverList;
|
private List<ServerData> serverList;
|
||||||
|
|
||||||
@Inject(method = "load", at = @At("TAIL"))
|
@Inject(method = "load", at = @At("RETURN"))
|
||||||
public void afterLoad(CallbackInfo ci) {
|
public void afterLoad(CallbackInfo ci) {
|
||||||
if (serverList.stream().noneMatch(data -> Domains.contains(data.ip))) {
|
if (serverList.stream().noneMatch(data -> Domains.contains(data.ip))) {
|
||||||
serverList.addFirst(new ServerData("6b6t", "6b6t.org", ServerData.Type.OTHER));
|
serverList.addFirst(new ServerData("6b6t", "6b6t.org", ServerData.Type.OTHER));
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"id": "anarchymod",
|
"id": "anarchymod",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"name": "AnarchyMod",
|
"name": "AnarchyMod",
|
||||||
"description": "Client-side mod for anarchy Minecraft servers",
|
"description": "Bypass a potential Mojang blacklist of 6b6t - the biggest anarchy server in the world.",
|
||||||
"authors": ["6b6t"],
|
"authors": ["6b6t"],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://6b6t.org",
|
"homepage": "https://6b6t.org",
|
||||||
@@ -21,6 +21,13 @@
|
|||||||
"mixins": [
|
"mixins": [
|
||||||
"anarchymod.mixins.json"
|
"anarchymod.mixins.json"
|
||||||
],
|
],
|
||||||
|
"custom": {
|
||||||
|
"modmenu": {
|
||||||
|
"links": {
|
||||||
|
"modmenu.discord": "https://6b6t.org/discord"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"fabricloader": ">=${loader_version}",
|
"fabricloader": ">=${loader_version}",
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ base {
|
|||||||
repositories {
|
repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
resources.srcDir(project(":common").sourceSets["main"].resources.srcDirs)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft("com.mojang:minecraft:$minecraftVersion")
|
minecraft("com.mojang:minecraft:$minecraftVersion")
|
||||||
mappings(loom.officialMojangMappings())
|
mappings(loom.officialMojangMappings())
|
||||||
@@ -25,11 +31,6 @@ dependencies {
|
|||||||
implementation(project(":common"))
|
implementation(project(":common"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Jar>("jar") {
|
|
||||||
dependsOn(project(":common").tasks.named("classes"))
|
|
||||||
from(project(":common").sourceSets["main"].output)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
inputs.property("version", project.version)
|
inputs.property("version", project.version)
|
||||||
inputs.property("minecraft_version", minecraftVersion)
|
inputs.property("minecraft_version", minecraftVersion)
|
||||||
@@ -57,6 +58,8 @@ java {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
|
dependsOn(project(":common").tasks.named("classes"))
|
||||||
|
from(project(":common").sourceSets["main"].output.classesDirs)
|
||||||
from("LICENSE") {
|
from("LICENSE") {
|
||||||
rename { "${it}_${base.archivesName.get()}" }
|
rename { "${it}_${base.archivesName.get()}" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
@Mixin(BlockedServers.class)
|
@Mixin(BlockedServers.class)
|
||||||
public class BlockedServersMixin {
|
public class BlockedServersMixin {
|
||||||
|
|
||||||
@Inject(method = "isBlockedServerHostName", at = @At("TAIL"), cancellable = true, remap = false)
|
@Inject(method = "isBlockedServerHostName", at = @At("RETURN"), cancellable = true, remap = false)
|
||||||
public void isBlockedServerHostName(String server, CallbackInfoReturnable<Boolean> cir) {
|
public void isBlockedServerHostName(String server, CallbackInfoReturnable<Boolean> cir) {
|
||||||
boolean contains = Domains.contains(server);
|
boolean contains = Domains.contains(server);
|
||||||
if (contains) {
|
if (contains) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class ServerListMixin {
|
|||||||
@Final
|
@Final
|
||||||
private List<ServerData> serverList;
|
private List<ServerData> serverList;
|
||||||
|
|
||||||
@Inject(method = "load", at = @At("TAIL"))
|
@Inject(method = "load", at = @At("RETURN"))
|
||||||
public void afterLoad(CallbackInfo ci) {
|
public void afterLoad(CallbackInfo ci) {
|
||||||
if (serverList.stream().noneMatch(data -> Domains.contains(data.ip))) {
|
if (serverList.stream().noneMatch(data -> Domains.contains(data.ip))) {
|
||||||
serverList.addFirst(new ServerData("6b6t", "6b6t.org", ServerData.Type.OTHER));
|
serverList.addFirst(new ServerData("6b6t", "6b6t.org", ServerData.Type.OTHER));
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"id": "anarchymod",
|
"id": "anarchymod",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"name": "AnarchyMod",
|
"name": "AnarchyMod",
|
||||||
"description": "Client-side mod for anarchy Minecraft servers",
|
"description": "Bypass a potential Mojang blacklist of 6b6t - the biggest anarchy server in the world.",
|
||||||
"authors": ["6b6t"],
|
"authors": ["6b6t"],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://6b6t.org",
|
"homepage": "https://6b6t.org",
|
||||||
@@ -21,6 +21,13 @@
|
|||||||
"mixins": [
|
"mixins": [
|
||||||
"anarchymod.mixins.json"
|
"anarchymod.mixins.json"
|
||||||
],
|
],
|
||||||
|
"custom": {
|
||||||
|
"modmenu": {
|
||||||
|
"links": {
|
||||||
|
"modmenu.discord": "https://6b6t.org/discord"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"fabricloader": ">=${loader_version}",
|
"fabricloader": ">=${loader_version}",
|
||||||
|
|||||||
@@ -17,6 +17,12 @@ base {
|
|||||||
repositories {
|
repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
resources.srcDir(project(":common").sourceSets["main"].resources.srcDirs)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft("com.mojang:minecraft:$minecraftVersion")
|
minecraft("com.mojang:minecraft:$minecraftVersion")
|
||||||
mappings(loom.officialMojangMappings())
|
mappings(loom.officialMojangMappings())
|
||||||
@@ -25,11 +31,6 @@ dependencies {
|
|||||||
implementation(project(":common"))
|
implementation(project(":common"))
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named<Jar>("jar") {
|
|
||||||
dependsOn(project(":common").tasks.named("classes"))
|
|
||||||
from(project(":common").sourceSets["main"].output)
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.processResources {
|
tasks.processResources {
|
||||||
inputs.property("version", project.version)
|
inputs.property("version", project.version)
|
||||||
inputs.property("minecraft_version", minecraftVersion)
|
inputs.property("minecraft_version", minecraftVersion)
|
||||||
@@ -57,6 +58,8 @@ java {
|
|||||||
}
|
}
|
||||||
|
|
||||||
tasks.jar {
|
tasks.jar {
|
||||||
|
dependsOn(project(":common").tasks.named("classes"))
|
||||||
|
from(project(":common").sourceSets["main"].output.classesDirs)
|
||||||
from("LICENSE") {
|
from("LICENSE") {
|
||||||
rename { "${it}_${base.archivesName.get()}" }
|
rename { "${it}_${base.archivesName.get()}" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||||||
@Mixin(BlockedServers.class)
|
@Mixin(BlockedServers.class)
|
||||||
public class BlockedServersMixin {
|
public class BlockedServersMixin {
|
||||||
|
|
||||||
@Inject(method = "isBlockedServerHostName", at = @At("TAIL"), cancellable = true, remap = false)
|
@Inject(method = "isBlockedServerHostName", at = @At("RETURN"), cancellable = true, remap = false)
|
||||||
public void isBlockedServerHostName(String server, CallbackInfoReturnable<Boolean> cir) {
|
public void isBlockedServerHostName(String server, CallbackInfoReturnable<Boolean> cir) {
|
||||||
boolean contains = Domains.contains(server);
|
boolean contains = Domains.contains(server);
|
||||||
if (contains) {
|
if (contains) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class ServerListMixin {
|
|||||||
@Final
|
@Final
|
||||||
private List<ServerData> serverList;
|
private List<ServerData> serverList;
|
||||||
|
|
||||||
@Inject(method = "load", at = @At("TAIL"))
|
@Inject(method = "load", at = @At("RETURN"))
|
||||||
public void afterLoad(CallbackInfo ci) {
|
public void afterLoad(CallbackInfo ci) {
|
||||||
if (serverList.stream().noneMatch(data -> Domains.contains(data.ip))) {
|
if (serverList.stream().noneMatch(data -> Domains.contains(data.ip))) {
|
||||||
serverList.addFirst(new ServerData("6b6t", "6b6t.org", ServerData.Type.OTHER));
|
serverList.addFirst(new ServerData("6b6t", "6b6t.org", ServerData.Type.OTHER));
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"id": "anarchymod",
|
"id": "anarchymod",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"name": "AnarchyMod",
|
"name": "AnarchyMod",
|
||||||
"description": "Client-side mod for anarchy Minecraft servers",
|
"description": "Bypass a potential Mojang blacklist of 6b6t - the biggest anarchy server in the world.",
|
||||||
"authors": ["6b6t"],
|
"authors": ["6b6t"],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://6b6t.org",
|
"homepage": "https://6b6t.org",
|
||||||
@@ -21,6 +21,13 @@
|
|||||||
"mixins": [
|
"mixins": [
|
||||||
"anarchymod.mixins.json"
|
"anarchymod.mixins.json"
|
||||||
],
|
],
|
||||||
|
"custom": {
|
||||||
|
"modmenu": {
|
||||||
|
"links": {
|
||||||
|
"modmenu.discord": "https://6b6t.org/discord"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"fabricloader": ">=${loader_version}",
|
"fabricloader": ">=${loader_version}",
|
||||||
|
|||||||
Reference in New Issue
Block a user