本文整理汇总了Java中net.minecraft.network.packet.Packet131MapData类的典型用法代码示例。如果您正苦于以下问题:Java Packet131MapData类的具体用法?Java Packet131MapData怎么用?Java Packet131MapData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Packet131MapData类属于net.minecraft.network.packet包,在下文中一共展示了Packet131MapData类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getTileInfoPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public static Packet131MapData getTileInfoPacket(TileEntity tile) {
if (!(tile instanceof IEntityAdditionalSpawnData)) throw new IllegalArgumentException("Tile information packets require a TileEntity implementing IEntityAdditionalSpawnData");
IEntityAdditionalSpawnData data = (IEntityAdditionalSpawnData)tile;
ByteArrayDataOutput os = ByteStreams.newDataOutput();
os.writeInt(tile.xCoord);
os.writeInt(tile.yCoord);
os.writeInt(tile.zCoord);
data.writeSpawnData(os);
return PacketDispatcher.getTinyPacket(MiscPeripherals.instance, (short)3, os.toByteArray());
}
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:13,代码来源:NetworkHelper.java
示例2: getModulePacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public static Packet131MapData getModulePacket(Module module, byte[] data) {
ByteArrayDataOutput os = ByteStreams.newDataOutput();
os.writeUTF(module.getClass().getSimpleName().substring(6));
os.write(data);
return PacketDispatcher.getTinyPacket(MiscPeripherals.instance, (short)6, os.toByteArray());
}
开发者ID:austinv11,项目名称:PeripheralsPlusPlus,代码行数:8,代码来源:NetworkHelper.java
示例3: func_72494_a
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public void func_72494_a(Packet131MapData p_72494_1_) {
if(p_72494_1_.field_73438_a == Item.field_77744_bd.field_77779_bT) {
ItemMap.func_77874_a(p_72494_1_.field_73436_b, this.field_72563_h.field_71441_e).func_76192_a(p_72494_1_.field_73437_c);
} else {
this.field_72563_h.func_98033_al().func_98236_b("Unknown itemid: " + p_72494_1_.field_73436_b);
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:9,代码来源:NetClientHandler.java
示例4: handleMapData
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
/**
* Contains logic for handling packets containing arbitrary unique item data. Currently this is only for maps.
*/
public void handleMapData(Packet131MapData par1Packet131MapData)
{
FMLNetworkHandler.handlePacket131Packet(this, par1Packet131MapData);
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:10,代码来源:NetServerHandler.java
示例5: fmlPacket131Callback
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public void fmlPacket131Callback(Packet131MapData par1Packet131MapData)
{
if (par1Packet131MapData.itemID == Item.map.itemID)
{
ItemMap.getMPMapData(par1Packet131MapData.uniqueID, this.mc.theWorld).updateMPMapData(par1Packet131MapData.itemData);
}
else
{
this.mc.getLogAgent().logWarning("Unknown itemid: " + par1Packet131MapData.uniqueID);
}
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:12,代码来源:NetClientHandler.java
示例6: handle
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
public void handle(NetHandler handler, Packet131MapData mapData)
{
int id = mapData.uniqueID;
if(handler instanceof NetServerHandler)
{
handleServerPacket((NetServerHandler)handler, mapData.uniqueID, mapData.itemData, (EntityPlayerMP)handler.getPlayer());
}
else
{
handleClientPacket((NetClientHandler)handler, mapData.uniqueID, mapData.itemData);
}
}
开发者ID:iChun,项目名称:MobVsMob,代码行数:14,代码来源:MapPacketHandler.java
示例7: handle
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
public void handle(NetHandler handler, Packet131MapData mapData) {
if (handler instanceof NetServerHandler)
ChiselEventHandler.place(handler.getPlayer(),
handler.getPlayer().worldObj);
}
开发者ID:delta534,项目名称:Chisel,代码行数:7,代码来源:TinyChiselPacketHandler.java
示例8: handleMapData
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
public void handleMapData(Packet131MapData par1Packet131MapData)
{
nch.handleMapData(par1Packet131MapData);
}
开发者ID:xurei,项目名称:forge_world_downloader,代码行数:6,代码来源:WDLNetClientHandler.java
示例9: fmlPacket131Callback
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public void fmlPacket131Callback(Packet131MapData par1Packet131MapData)
{
nch.fmlPacket131Callback(par1Packet131MapData);
}
开发者ID:xurei,项目名称:forge_world_downloader,代码行数:5,代码来源:WDLNetClientHandler.java
示例10: handleTinyPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
((NetClientHandler)handler).fmlPacket131Callback(mapData);
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:6,代码来源:FMLClientHandler.java
示例11: handleTinyPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
// NOOP on server
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:6,代码来源:FMLServerHandler.java
示例12: getTinyPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public static Packet131MapData getTinyPacket(Object mod, short tag, byte[] data)
{
NetworkModHandler nmh = FMLNetworkHandler.instance().findNetworkModHandler(mod);
return new Packet131MapData((short) nmh.getNetworkId(), tag, data);
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:6,代码来源:PacketDispatcher.java
示例13: handleTinyPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public void handleTinyPacket(NetHandler handler, Packet131MapData mapData)
{
sidedDelegate.handleTinyPacket(handler, mapData);
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:5,代码来源:FMLCommonHandler.java
示例14: func_72494_a
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public void func_72494_a(Packet131MapData p_72494_1_) {
this.func_72509_a(p_72494_1_);
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:4,代码来源:NetHandler.java
示例15: func_77871_c
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public Packet func_77871_c(ItemStack p_77871_1_, World p_77871_2_, EntityPlayer p_77871_3_) {
byte[] var4 = this.func_77873_a(p_77871_1_, p_77871_2_).func_76193_a(p_77871_1_, p_77871_2_, p_77871_3_);
return var4 == null?null:new Packet131MapData((short)Item.field_77744_bd.field_77779_bT, (short)p_77871_1_.func_77960_j(), var4);
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:5,代码来源:ItemMap.java
示例16: handle
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
@Override
public void handle(NetHandler handler, Packet131MapData mapData)
{
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:6,代码来源:ForgeTinyPacketHandler.java
示例17: createMapDataPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
/**
* returns null if no update is to be sent
*/
public Packet createMapDataPacket(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
byte[] abyte = this.getMapData(par1ItemStack, par2World).getUpdatePacketData(par1ItemStack, par2World, par3EntityPlayer);
return abyte == null ? null : new Packet131MapData((short)Item.map.itemID, (short)par1ItemStack.getItemDamage(), abyte);
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:9,代码来源:ItemMap.java
示例18: handleMapData
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
/**
* Contains logic for handling packets containing arbitrary unique item data. Currently this is only for maps.
*/
public void handleMapData(Packet131MapData par1Packet131MapData)
{
FMLNetworkHandler.handlePacket131Packet(this, par1Packet131MapData);
}
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:8,代码来源:NetClientHandler.java
示例19: fmlPacket131Callback
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
public void fmlPacket131Callback(Packet131MapData mapData) {
}
开发者ID:agaricusb,项目名称:MLIA,代码行数:4,代码来源:NetClientHandler.java
示例20: handleTinyPacket
import net.minecraft.network.packet.Packet131MapData; //导入依赖的package包/类
void handleTinyPacket(NetHandler handler, Packet131MapData mapData);
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:2,代码来源:IFMLSidedHandler.java
注:本文中的net.minecraft.network.packet.Packet131MapData类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论