- Migrate package from me.itskronx11 to net.blockhost across all modules - Add MIT LICENSE and rewrite README with badges, features, and build instructions - Add GitHub Actions CI (build.yml) and release automation (release.yml) - Migrate MC module build files from Groovy to Kotlin DSL (build.gradle.kts) - Update fabric.mod.json with proper metadata, contact info, and java >=21 dep - Remove unused fabricApi configureDataGeneration block - Add .editorconfig and root gradle.properties for shared config - Set GitHub repo description Co-Authored-By: Claude Opus 4.6 <[email protected]>
22 lines
813 B
Java
22 lines
813 B
Java
package net.blockhost.anarchymod;
|
|
|
|
import net.fabricmc.api.ClientModInitializer;
|
|
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents;
|
|
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
|
import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry;
|
|
import net.minecraft.core.registries.BuiltInRegistries;
|
|
|
|
public class AnarchyMod implements ClientModInitializer {
|
|
|
|
@Override
|
|
public void onInitializeClient() {
|
|
PayloadTypeRegistry.playC2S().register(JoinPayload.TYPE, JoinPayload.CODEC);
|
|
ClientPlayConnectionEvents.JOIN.register((listener, sender, client) -> {
|
|
if (client.getCurrentServer() != null && Domains.contains(client.getCurrentServer().ip))
|
|
sender.sendPacket(new JoinPayload());
|
|
});
|
|
}
|
|
|
|
|
|
}
|