mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
send Associated Data to all
This commit is contained in:
1 parent
ae1f33d327
commit
ee33a57323
1 file changed
+11
-9
@@ -59,15 +59,17 @@ public class Server {
|
||||
}
|
||||
|
||||
public static void sendAssociatedData(Entity entity, EnumPacketClient enu, Object... obs) {
|
||||
ByteBuf buffer = Unpooled.buffer();
|
||||
try {
|
||||
if(!fillBuffer(buffer, enu, obs))
|
||||
return;
|
||||
TargetPoint point = new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 60);
|
||||
CustomNpcs.Channel.sendToAllAround(new FMLProxyPacket(buffer,"CustomNPCs"), point);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
CustomNPCsScheduler.runTack(() -> {
|
||||
ByteBuf buffer = Unpooled.buffer();
|
||||
try {
|
||||
if(!fillBuffer(buffer, enu, obs))
|
||||
return;
|
||||
TargetPoint point = new TargetPoint(entity.dimension, entity.posX, entity.posY, entity.posZ, 60);
|
||||
CustomNpcs.Channel.sendToAllAround(new FMLProxyPacket(buffer,"CustomNPCs"), point);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
public static void sendToAll(EnumPacketClient enu, Object... obs) {
|
||||
ByteBuf buffer = Unpooled.buffer();
|
||||
|
||||
Reference in new issue
Block a user