Search in sources :

Example 1 with TargetPoint

use of net.minecraftforge.fml.network.PacketDistributor.TargetPoint in project Random-Things by lumien231.

the class RTPacketHandler method sendToAllNear.

public static void sendToAllNear(IRTMessage message, World world, BlockPos pos, float radius) {
    PacketTarget target = PacketDistributor.NEAR.with(() -> new TargetPoint(pos.getX(), pos.getY(), pos.getZ(), radius, world.getDimension().getType()));
    HANDLER.send(target, message);
}
Also used : PacketTarget(net.minecraftforge.fml.network.PacketDistributor.PacketTarget) TargetPoint(net.minecraftforge.fml.network.PacketDistributor.TargetPoint)

Aggregations

PacketTarget (net.minecraftforge.fml.network.PacketDistributor.PacketTarget)1 TargetPoint (net.minecraftforge.fml.network.PacketDistributor.TargetPoint)1