mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-14 02:34:10 +00:00
Make Public for DBC Addon to use
This commit is contained in:
1 parent
48e3ae5271
commit
3e6a5410ab
2 files changed
+3
-4
No files matched your search
@@ -91,7 +91,7 @@ public class PacketHandler {
|
||||
// Server to Client
|
||||
public static final PacketChannel DATA_PACKET = new PacketChannel("CNPC+|Data", EnumChannelType.DATA);
|
||||
|
||||
private static final List<PacketChannel> packetChannels = new ArrayList<>();
|
||||
public static final List<PacketChannel> packetChannels = new ArrayList<>();
|
||||
|
||||
public PacketHandler() {
|
||||
// Register Channels
|
||||
@@ -99,7 +99,6 @@ public class PacketHandler {
|
||||
packetChannels.add(PLAYER_PACKET);
|
||||
packetChannels.add(DATA_PACKET);
|
||||
|
||||
this.registerChannels();
|
||||
this.registerDataPackets();
|
||||
this.registerRequestPackets();
|
||||
this.registerPlayerPackets();
|
||||
@@ -384,13 +383,12 @@ public class PacketHandler {
|
||||
PLAYER_PACKET.registerPacket(new ScreenSizePacket());
|
||||
}
|
||||
|
||||
private void registerChannels() {
|
||||
public void registerChannels() {
|
||||
for (PacketChannel channel : packetChannels) {
|
||||
FMLEventChannel eventChannel =
|
||||
NetworkRegistry.INSTANCE.newEventDrivenChannel(channel.getChannelName());
|
||||
eventChannel.register(this);
|
||||
channels.put(channel.getChannelType(), eventChannel);
|
||||
System.out.println("Registered channel: " + channel.getChannelName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -191,6 +191,7 @@ public class CustomNpcs {
|
||||
MARKOV_GENERATOR[8] = new MarkovCustomNPCsClassic(3);
|
||||
MARKOV_GENERATOR[9] = new MarkovSpanish(3);
|
||||
|
||||
PacketHandler.Instance.registerChannels();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
||||
Reference in new issue
Block a user