本文整理匯總了Java中net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint方法的典型用法代碼示例。如果您正苦於以下問題:Java NetworkRegistry.TargetPoint方法的具體用法?Java NetworkRegistry.TargetPoint怎麽用?Java NetworkRegistry.TargetPoint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraftforge.fml.common.network.NetworkRegistry
的用法示例。
在下文中一共展示了NetworkRegistry.TargetPoint方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateNetwork
import net.minecraftforge.fml.common.network.NetworkRegistry; //導入方法依賴的package包/類
@Override
public void updateNetwork()
{
NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint(
world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 16.0d);
ModMain.network.sendToAllAround(new PacketNetherBrickOvenFuelLevel(
pos, fuelTank.getFluid()), point);
}
示例2: sendToAllAround
import net.minecraftforge.fml.common.network.NetworkRegistry; //導入方法依賴的package包/類
public static void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) {
INSTANCE.sendToAllAround(message, point);
}
示例3: getTargetPoint
import net.minecraftforge.fml.common.network.NetworkRegistry; //導入方法依賴的package包/類
public NetworkRegistry.TargetPoint getTargetPoint(World world) {
return getTargetPoint(world, TileEntityConstants.PACKET_UPDATE_DISTANCE);
}
示例4: spawnParticle
import net.minecraftforge.fml.common.network.NetworkRegistry; //導入方法依賴的package包/類
public static void spawnParticle(ParticleF particleF, World world, double x, double y, double z, int amount, double xSpeed, double ySpeed, double zSpeed, int... args) {
NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint(world.provider.getDimension(), x, y, z, 10);
HANDLER.sendToAllAround(new ParticleMessage(particleF, x, y, z, amount, xSpeed, ySpeed, zSpeed, args), point);
}
示例5: sendToAllAround
import net.minecraftforge.fml.common.network.NetworkRegistry; //導入方法依賴的package包/類
public static final void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) {
dispatcher.sendToAllAround(message, point);
}
示例6: sendToAllAround
import net.minecraftforge.fml.common.network.NetworkRegistry; //導入方法依賴的package包/類
/**
* Send this message to everyone within a certain range of a point.
* The {@link IMessageHandler} for this message type should be on the CLIENT side.
*
* @param message The message to send
* @param point The {@link TargetPoint} around which to send
*/
public void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point)
{
channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGET).set(FMLOutboundHandler.OutboundTarget.ALLAROUNDPOINT);
channels.get(Side.SERVER).attr(FMLOutboundHandler.FML_MESSAGETARGETARGS).set(point);
channels.get(Side.SERVER).writeAndFlush(message).addListener(ChannelFutureListener.FIRE_EXCEPTION_ON_FAILURE);
}