当前位置: 首页>>代码示例>>Java>>正文


Java MCDataOutput类代码示例

本文整理汇总了Java中codechicken.lib.data.MCDataOutput的典型用法代码示例。如果您正苦于以下问题:Java MCDataOutput类的具体用法?Java MCDataOutput怎么用?Java MCDataOutput使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


MCDataOutput类属于codechicken.lib.data包,在下文中一共展示了MCDataOutput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeToPacket

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeToPacket(MCDataOutput packet) {
    int attachmask = 0;
    for (int i = 0; i < 6; i++) {
        if (attachments[i] != null) {
            attachmask |= 1 << i;
        }
    }

    packet.writeByte(attachmask);
    for (Attachment a : attachments) {
        if (a != null) {
            a.write(packet);
        }
    }
}
 
开发者ID:TheCBProject,项目名称:Translocators,代码行数:17,代码来源:TileTranslocator.java

示例2: writeDesc

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet) {

    if (hidden == null)
        hidden = new boolean[6];

    super.writeDesc(packet);

    for (int i = 0; i < 6; i++)
        packet.writeBoolean(hidden[i]);

    for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
        Collection<IFrameSideModifier> c = getSideModifiers(d);
        packet.writeInt(c.size());
        for (IFrameModifier m : c)
            packet.writeString(m.getType());
    }
}
 
开发者ID:amadornes,项目名称:Framez,代码行数:19,代码来源:PartFrame.java

示例3: writeDesc

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet) {

    super.writeDesc(packet);
    packet.writeInt(facePart.getFace());
    packet.writeInt(facePart.getRotation());
    for (int i = 0; i < 4; i++) {
        RedstoneConnection c = ((BPPartFace) getPart()).getConnection(FaceDirection.getDirection(i));
        if (c != null) {
            packet.writeNBTTagCompound(c.getNBTTag());
        } else {
            NBTTagCompound t = new NBTTagCompound();
            t.setBoolean("___error", true);
            packet.writeNBTTagCompound(t);
        }
    }
}
 
开发者ID:Quetzi,项目名称:BluePower,代码行数:18,代码来源:MultipartFaceBPPart.java

示例4: writeDesc

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet) {

    super.writeDesc(packet);

    FMPDataOutput buffer = new FMPDataOutput(packet);

    try {
        buffer.writeInt(getPartMap().size());

        for (Entry<String, IPart> e : getPartMap().entrySet()) {
            buffer.writeUTF(e.getKey());
            buffer.writeUTF(e.getValue().getType());
            e.getValue().writeUpdateData(buffer, -1);
        }
    } catch (Exception ex) {
        ex.printStackTrace();
    }
}
 
开发者ID:Qmunity,项目名称:QmunityLib,代码行数:20,代码来源:FMPPart.java

示例5: writeToPacket

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeToPacket(MCDataOutput packet) {
    super.writeToPacket(packet);
    packet.writeByte(rotation);
    packet.writeFluidStack(liquid_state.s_liquid);
    packet.writeBoolean(pressure_state.a_pressure);
}
 
开发者ID:TheCBProject,项目名称:EnderStorage,代码行数:8,代码来源:TileEnderTank.java

示例6: writeToPacket

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeToPacket(MCDataOutput packet) {
    packet.writeBoolean(active);
    packet.writeBoolean(owner != null);
    if (owner != null) {
        packet.writeString(owner);
    }
}
 
开发者ID:TheCBProject,项目名称:ChickenChunks,代码行数:9,代码来源:TileChunkLoaderBase.java

示例7: write

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void write(MCDataOutput packet) {

    super.write(packet);
    packet.writeBoolean(regulate);
    packet.writeBoolean(signal);
    packet.writeBoolean(a_powering);
}
 
开发者ID:TheCBProject,项目名称:Translocators,代码行数:9,代码来源:TileItemTranslocator.java

示例8: writeToPacket

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeToPacket(MCDataOutput packet) {
    packet.writeByte(rotation);
    for (ItemStack item : items) {
        packet.writeItemStack(item);
    }
}
 
开发者ID:TheCBProject,项目名称:Translocators,代码行数:8,代码来源:TileCraftingGrid.java

示例9: writeDesc

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet)
{
	packet.writeByte(currentTransmitterConnections);
	packet.writeByte(currentAcceptorConnections);

	for(int i = 0; i < 6; i++)
	{
		packet.writeInt(connectionTypes[i].ordinal());
	}
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:12,代码来源:PartSidedPipe.java

示例10: writeDesc

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet)
{
	packet.writeBoolean(false);
	
	super.writeDesc(packet);
}
 
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:8,代码来源:PartHeatTransmitter.java

示例11: writeDesc

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet) {

    super.writeDesc(packet);
    
    packet.writeString(getPart().getType());
    
    NBTTagCompound tag = new NBTTagCompound();
    getPart().save(tag);
    packet.writeNBTTagCompound(tag);
}
 
开发者ID:Quetzi,项目名称:BluePower,代码行数:12,代码来源:MultipartBPPart.java

示例12: writeDesc

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet) {

    super.writeDesc(packet);
    packet.writeInt(facePart.getFace());
    packet.writeInt(facePart.getRotation());
}
 
开发者ID:amadornes,项目名称:AmadornesLib,代码行数:8,代码来源:MultipartAmaPartFace.java

示例13: writeDesc

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet){
    for(int i = 0; i < 6; i++) {
        packet.writeBoolean(tube.sidesConnected[i]);
    }
    NBTTagCompound tag = new NBTTagCompound();
    tube.writeToNBT(tag);
    packet.writeNBTTagCompound(tag);
}
 
开发者ID:MineMaarten,项目名称:PneumaticCraft,代码行数:10,代码来源:PartPressureTube.java

示例14: writeDesc

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet) {
    super.writeDesc(packet);
    packet.writeShort(currentfreq);
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:6,代码来源:TransceiverPart.java

示例15: writeDesc

import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet) {
    packet.writeByte(state);
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:5,代码来源:WirelessPart.java


注:本文中的codechicken.lib.data.MCDataOutput类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。