Should fix weird stacktraces being thrown when mods like Citadel and Caves and Cliffs Backport are installed together
23 lines
923 B
Java
23 lines
923 B
Java
package org.embeddedt.modernfix.packet;
|
|
|
|
import net.minecraft.resources.ResourceLocation;
|
|
import net.minecraftforge.fml.network.NetworkRegistry;
|
|
import net.minecraftforge.fml.network.simple.SimpleChannel;
|
|
import org.embeddedt.modernfix.ModernFix;
|
|
import org.embeddedt.modernfix.ModernFixClient;
|
|
|
|
public class PacketHandler {
|
|
private static final String PROTOCOL_VERSION = "1";
|
|
public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel(
|
|
new ResourceLocation(ModernFix.MODID, "main"),
|
|
() -> PROTOCOL_VERSION,
|
|
NetworkRegistry.acceptMissingOr(PROTOCOL_VERSION),
|
|
NetworkRegistry.acceptMissingOr(PROTOCOL_VERSION)
|
|
);
|
|
|
|
public static void register() {
|
|
int id = 1;
|
|
INSTANCE.registerMessage(id++, EntityIDSyncPacket.class, EntityIDSyncPacket::serialize, EntityIDSyncPacket::deserialize, ModernFixClient::handleEntityIDSync);
|
|
}
|
|
}
|