當前位置: 首頁>>代碼示例>>Java>>正文


Java NetworkRegistry.TargetPoint方法代碼示例

本文整理匯總了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);
}
 
開發者ID:einsteinsci,項目名稱:BetterBeginningsReborn,代碼行數:9,代碼來源:TileEntityNetherBrickOven.java

示例2: sendToAllAround

import net.minecraftforge.fml.common.network.NetworkRegistry; //導入方法依賴的package包/類
public static void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) {
    INSTANCE.sendToAllAround(message, point);
}
 
開發者ID:TeamPneumatic,項目名稱:pnc-repressurized,代碼行數:4,代碼來源:NetworkHandler.java

示例3: getTargetPoint

import net.minecraftforge.fml.common.network.NetworkRegistry; //導入方法依賴的package包/類
public NetworkRegistry.TargetPoint getTargetPoint(World world) {
    return getTargetPoint(world, TileEntityConstants.PACKET_UPDATE_DISTANCE);
}
 
開發者ID:TeamPneumatic,項目名稱:pnc-repressurized,代碼行數:4,代碼來源:LocationDoublePacket.java

示例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);
}
 
開發者ID:Um-Mitternacht,項目名稱:Bewitchment,代碼行數:5,代碼來源:PacketHandler.java

示例5: sendToAllAround

import net.minecraftforge.fml.common.network.NetworkRegistry; //導入方法依賴的package包/類
public static final void sendToAllAround(IMessage message, NetworkRegistry.TargetPoint point) {
	dispatcher.sendToAllAround(message, point);
}
 
開發者ID:Zundrel,項目名稱:Never-Enough-Currency,代碼行數:4,代碼來源:PacketDispatcher.java

示例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);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:14,代碼來源:SimpleNetworkWrapper.java


注:本文中的net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。