Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bdb43a8280 | ||
|
|
324a9b899e | ||
|
|
3ae90416c8 | ||
|
|
2c53427a23 |
@@ -3,13 +3,20 @@
|
||||
[](https://github.com/6b6t/AnarchyMod/actions/workflows/build.yml)
|
||||
[](LICENSE)
|
||||
|
||||
🔓 The Minecraft mod required to play on 6b6t — bypass Mojang's ban of the world's biggest anarchy server.
|
||||
🔓 Bypass Mojang's blocked server list and connect to any Minecraft server.
|
||||
|
||||
This is a fork of [6b6t/AnarchyMod](https://github.com/6b6t/AnarchyMod), reworked so that the mod is useful for any server and keeps to itself.
|
||||
|
||||
## What's different from upstream
|
||||
|
||||
- **Every server is unblocked, not just a hardcoded list.** Upstream only bypassed the ban for domains on a built-in allowlist of anarchy servers (belonging to 6b6t), extended at startup by a list downloaded from `6b6t.org`. Both are gone: the mod now reports every server as unblocked.
|
||||
- **No telemetry.** Upstream sent a packet to the server on every join, and the domain download was a second call home. Neither remains, and the mod makes no network requests of its own.
|
||||
- **Your server list is left alone.** Upstream inserted 6b6t at the top of your multiplayer list if no matching server was present. It no longer touches your server list.
|
||||
- **No 6b6t promotion in the mod.** The tracked homepage link and the Discord entry are gone from the mod metadata.
|
||||
|
||||
## Features
|
||||
|
||||
- **Server unblocking** — bypasses Mojang's blocked server list for known anarchy servers
|
||||
- **Auto server list** — automatically adds 6b6t to your server list if not already present
|
||||
- **Join notification** — sends a lightweight packet to the server on join for analytics
|
||||
- **Server unblocking** — bypasses Mojang's blocked server list for every server
|
||||
|
||||
## Supported Minecraft Versions
|
||||
|
||||
@@ -42,10 +49,7 @@
|
||||
|
||||
## Installation
|
||||
|
||||
AnarchyMod is required to connect to and play on 6b6t.
|
||||
|
||||
1. Install [Fabric Loader](https://fabricmc.net/) and [Fabric API](https://modrinth.com/mod/fabric-api) for your
|
||||
Minecraft version
|
||||
1. Install [Fabric Loader](https://fabricmc.net/) and [Fabric API](https://modrinth.com/mod/fabric-api) for your Minecraft version
|
||||
2. Download the matching JAR from [Releases](https://github.com/6b6t/AnarchyMod/releases)
|
||||
3. Place the JAR in your `.minecraft/mods` folder
|
||||
|
||||
@@ -54,7 +58,7 @@ AnarchyMod is required to connect to and play on 6b6t.
|
||||
Requires Java 25+ for the full multi-version build.
|
||||
|
||||
```sh
|
||||
git clone https://github.com/6b6t/AnarchyMod.git
|
||||
git clone https://github.com/Wokleim/AnarchyMod.git
|
||||
cd AnarchyMod
|
||||
./gradlew build
|
||||
```
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
# TODO
|
||||
|
||||
Goal: turn AnarchyMod into a generic blocked-server-list bypass, with no telemetry
|
||||
and no 6b6t-specific behaviour.
|
||||
|
||||
## Play on any server
|
||||
|
||||
- [x] Make `BlockedServersMixin` always report servers as unblocked, instead of only
|
||||
those on the 6b6t allowlist.
|
||||
- [x] Delete `Domains.java`. It held the hardcoded anarchy-server allowlist and also
|
||||
fetched an extra list from `https://www.6b6t.org/api/anarchy-mod.json` on startup.
|
||||
With every server unblocked there is nothing left to match against.
|
||||
|
||||
## Remove telemetry
|
||||
|
||||
- [x] Delete `JoinPayload.java` and stop registering it in `AnarchyMod.onInitializeClient`.
|
||||
- [x] Drop the `ClientPlayConnectionEvents.JOIN` listener that sent the packet to the
|
||||
server on every join.
|
||||
- [x] The remote domain fetch is gone with `Domains.java` (it was the other outbound call).
|
||||
- [x] Drop the utm-tagged homepage link from `fabric.mod.json`.
|
||||
|
||||
## Do not add 6b6t to the server list
|
||||
|
||||
- [x] Delete `ServerListMixin.java` and remove it from `anarchymod.mixins.json`.
|
||||
|
||||
## Metadata
|
||||
|
||||
- [x] Rewrite the `fabric.mod.json` description; remove the 6b6t homepage and Discord links.
|
||||
- [x] Add `Wokleim` to the authors.
|
||||
- [x] Remove the now-unused explicit `gson` dependency from `build.gradle.kts` and
|
||||
`modern-build.gradle.kts` (only `Domains.java` used it).
|
||||
|
||||
## Docs
|
||||
|
||||
- [x] Rewrite `README.md`: state that it is based on 6b6t/AnarchyMod, link the source,
|
||||
and list the changes made in this fork.
|
||||
- [x] Update the description in `_config.yml`.
|
||||
|
||||
## Notes / left alone on purpose
|
||||
|
||||
- `fabric-api` stays a required dependency and `AnarchyMod` stays the client entrypoint,
|
||||
even though the entrypoint no longer does anything. Decided against dropping it.
|
||||
- `contact.issues` / `contact.sources` still point at `github.com/6b6t/AnarchyMod`, kept
|
||||
as source attribution rather than as promotion.
|
||||
- Verified by compiling the 1.19.4, 1.20.5 and 1.21.11 modules, which covers all three
|
||||
Stonecutter branches the deleted code had. Not launched in a real client.
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
title: AnarchyMod
|
||||
description: 🔓 The Minecraft mod required to play on 6b6t — bypass Mojang's ban of the world's biggest anarchy server.
|
||||
description: 🔓 Bypass Mojang's blocked server list and connect to any Minecraft server.
|
||||
theme: jekyll-theme-hacker
|
||||
|
||||
# The release jar lives on the Releases page, so hide the source zip/tar buttons.
|
||||
|
||||
@@ -20,7 +20,6 @@ dependencies {
|
||||
mappings(loom.officialMojangMappings())
|
||||
modImplementation("net.fabricmc:fabric-loader:$loaderVersion")
|
||||
modImplementation("net.fabricmc.fabric-api:fabric-api:$fabricApiVersion")
|
||||
implementation("com.google.code.gson:gson:2.14.0")
|
||||
}
|
||||
|
||||
loom {
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx1G
|
||||
mod_version=1.3.0
|
||||
mod_version=1.3.1-SNAPSHOT
|
||||
maven_group=net.blockhost
|
||||
|
||||
@@ -19,7 +19,6 @@ dependencies {
|
||||
minecraft("com.mojang:minecraft:$minecraftVersion")
|
||||
implementation("net.fabricmc:fabric-loader:$loaderVersion")
|
||||
implementation("net.fabricmc.fabric-api:fabric-api:$fabricApiVersion")
|
||||
implementation("com.google.code.gson:gson:2.14.0")
|
||||
}
|
||||
|
||||
loom {
|
||||
|
||||
@@ -7,6 +7,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
|
||||
id("dev.kikugie.stonecutter") version "0.9.6"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,31 +1,11 @@
|
||||
package net.blockhost.anarchymod;
|
||||
|
||||
//? if <1.20.5 {
|
||||
/*import io.netty.buffer.Unpooled;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
*///?} else {
|
||||
import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry;
|
||||
//?}
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents;
|
||||
|
||||
public class AnarchyMod implements ClientModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
//? if >=26.1 {
|
||||
PayloadTypeRegistry.serverboundPlay().register(JoinPayload.TYPE, JoinPayload.CODEC);
|
||||
//?} else if >=1.20.5 {
|
||||
/*PayloadTypeRegistry.playC2S().register(JoinPayload.TYPE, JoinPayload.CODEC);
|
||||
*///?}
|
||||
ClientPlayConnectionEvents.JOIN.register((listener, sender, client) -> {
|
||||
if (client.getCurrentServer() != null && Domains.contains(client.getCurrentServer().ip))
|
||||
//? if <1.20.5 {
|
||||
/*ClientPlayNetworking.send(JoinPayload.ID, new FriendlyByteBuf(Unpooled.buffer()));
|
||||
*///?} else {
|
||||
sender.sendPacket(new JoinPayload());
|
||||
//?}
|
||||
});
|
||||
// Everything this mod does happens in BlockedServersMixin.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
package net.blockhost.anarchymod;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpRequest;
|
||||
import java.net.http.HttpResponse;
|
||||
import java.time.Duration;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
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 Set<String> DEFAULT = Set.of(
|
||||
"*.6b6t.org", "*.10b10t.org", "*.6b6t.cc", "*.6b6t.me",
|
||||
"*.7b7t.me", "*.8b8t.org", "*.alacity.net",
|
||||
"*.anarchypvp.pw", "*.l2x9.org", "*.simpleanarchy.org"
|
||||
);
|
||||
|
||||
private static final Set<String> domains = new HashSet<>();
|
||||
private static final Gson gson = new Gson();
|
||||
|
||||
static {
|
||||
DEFAULT.forEach(d -> domains.add(d.toLowerCase(Locale.ROOT)));
|
||||
loadRemote();
|
||||
}
|
||||
|
||||
private static void loadRemote() {
|
||||
try {
|
||||
HttpClient client = HttpClient.newHttpClient();
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(URI.create(DOMAINS_URL))
|
||||
.timeout(Duration.ofSeconds(15))
|
||||
.GET()
|
||||
.build();
|
||||
|
||||
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
|
||||
|
||||
JsonObject json = gson.fromJson(response.body(), JsonObject.class);
|
||||
JsonArray array = json.getAsJsonArray("domains");
|
||||
if (array == null) return;
|
||||
|
||||
array.forEach(element ->
|
||||
domains.add(element.getAsString().toLowerCase(Locale.ROOT))
|
||||
);
|
||||
} catch (Throwable t) {
|
||||
LOGGER.warning("Failed to load domains from remote, using defaults: " + t.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean contains(String input) {
|
||||
if (input == null) return false;
|
||||
|
||||
String domain = input.toLowerCase(Locale.ROOT);
|
||||
|
||||
if (domain.startsWith("*.")) {
|
||||
domain = domain.substring(2);
|
||||
}
|
||||
|
||||
int semiColon = domain.indexOf(':');
|
||||
if (semiColon != -1) {
|
||||
domain = domain.substring(0, semiColon);
|
||||
}
|
||||
|
||||
for (String entry : domains) {
|
||||
if (entry.startsWith("*.")) {
|
||||
String base = entry.substring(2);
|
||||
if (domain.equals(base) || domain.endsWith("." + base)) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (domain.equals(entry)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package net.blockhost.anarchymod;
|
||||
|
||||
//? if <1.20.5 {
|
||||
/*import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public class JoinPayload {
|
||||
|
||||
public static final ResourceLocation ID = new ResourceLocation("anarchymod", "join");
|
||||
}
|
||||
*///?} else {
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.network.codec.StreamCodec;
|
||||
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
|
||||
//? if >=1.21.11 {
|
||||
import net.minecraft.resources.Identifier;
|
||||
//? } else {
|
||||
/*import net.minecraft.resources.ResourceLocation;
|
||||
*///?}
|
||||
|
||||
public class JoinPayload implements CustomPacketPayload {
|
||||
|
||||
//? if >=1.21.11 {
|
||||
public static final Identifier ID = Identifier.fromNamespaceAndPath("anarchymod", "join");
|
||||
//? } elif >=1.21.7 {
|
||||
/*public static final ResourceLocation ID = ResourceLocation.fromNamespaceAndPath("anarchymod", "join");
|
||||
*///?} else {
|
||||
/*public static final ResourceLocation ID = ResourceLocation.tryBuild("anarchymod", "join");
|
||||
*///?}
|
||||
|
||||
public static final StreamCodec<FriendlyByteBuf, JoinPayload> CODEC =
|
||||
StreamCodec.of(
|
||||
(buf, payload) -> {},
|
||||
buf -> new JoinPayload()
|
||||
);
|
||||
|
||||
public static final Type<JoinPayload> TYPE =
|
||||
new Type<>(ID);
|
||||
|
||||
@Override
|
||||
public Type<? extends CustomPacketPayload> type() {
|
||||
return TYPE;
|
||||
}
|
||||
}
|
||||
//?}
|
||||
@@ -1,7 +1,6 @@
|
||||
package net.blockhost.anarchymod.mixin;
|
||||
|
||||
import com.mojang.patchy.BlockedServers;
|
||||
import net.blockhost.anarchymod.Domains;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
@@ -10,11 +9,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
@Mixin(BlockedServers.class)
|
||||
public class BlockedServersMixin {
|
||||
|
||||
@Inject(method = "isBlockedServerHostName", at = @At("RETURN"), cancellable = true, remap = false)
|
||||
@Inject(method = "isBlockedServerHostName", at = @At("HEAD"), cancellable = true, remap = false)
|
||||
public void isBlockedServerHostName(String server, CallbackInfoReturnable<Boolean> cir) {
|
||||
boolean contains = Domains.contains(server);
|
||||
if (contains) {
|
||||
cir.setReturnValue(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
package net.blockhost.anarchymod.mixin;
|
||||
|
||||
import net.blockhost.anarchymod.Domains;
|
||||
import net.minecraft.client.multiplayer.ServerData;
|
||||
import net.minecraft.client.multiplayer.ServerList;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mixin(ServerList.class)
|
||||
public class ServerListMixin {
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
private List<ServerData> serverList;
|
||||
|
||||
@Inject(method = "load", at = @At("RETURN"))
|
||||
public void afterLoad(CallbackInfo ci) {
|
||||
if (serverList.stream().noneMatch(data -> Domains.contains(data.ip))) {
|
||||
//? if <1.20.2 {
|
||||
/*serverList.add(0, new ServerData("6b6t", "6b6t.org", false));
|
||||
*///? } elif <1.20.5 {
|
||||
/*serverList.add(0, new ServerData("6b6t", "6b6t.org", ServerData.Type.OTHER));
|
||||
*///?} else {
|
||||
serverList.addFirst(new ServerData("6b6t", "6b6t.org", ServerData.Type.OTHER));
|
||||
//?}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,7 @@
|
||||
"package": "net.blockhost.anarchymod.mixin",
|
||||
"compatibilityLevel": "JAVA_${java_version}",
|
||||
"client": [
|
||||
"BlockedServersMixin",
|
||||
"ServerListMixin"
|
||||
"BlockedServersMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
"id": "anarchymod",
|
||||
"version": "${version}",
|
||||
"name": "AnarchyMod",
|
||||
"description": "The Minecraft mod required to play on 6b6t — bypass Mojang's ban of the world's biggest anarchy server.",
|
||||
"description": "Bypasses Mojang's blocked server list so you can connect to any Minecraft server.",
|
||||
"authors": [
|
||||
"6b6t"
|
||||
"6b6t",
|
||||
"Wokleim"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://www.6b6t.org/?utm_source=anarchymod&utm_medium=mod_menu&utm_campaign=evergreen_website&utm_content=description_link",
|
||||
"issues": "https://github.com/6b6t/AnarchyMod/issues",
|
||||
"sources": "https://github.com/6b6t/AnarchyMod"
|
||||
},
|
||||
@@ -23,13 +23,6 @@
|
||||
"mixins": [
|
||||
"anarchymod.mixins.json"
|
||||
],
|
||||
"custom": {
|
||||
"modmenu": {
|
||||
"links": {
|
||||
"modmenu.discord": "https://6b6t.org/discord"
|
||||
}
|
||||
}
|
||||
},
|
||||
"depends": {
|
||||
"fabric-api": "*",
|
||||
"fabricloader": ">=${loader_version}",
|
||||
|
||||
Reference in New Issue
Block a user