本文整理汇总了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);
}
}
}
示例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());
}
}
示例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);
}
}
}
示例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();
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例8: writeToPacket
import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeToPacket(MCDataOutput packet) {
packet.writeByte(rotation);
for (ItemStack item : items) {
packet.writeItemStack(item);
}
}
示例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());
}
}
示例10: writeDesc
import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet)
{
packet.writeBoolean(false);
super.writeDesc(packet);
}
示例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);
}
示例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());
}
示例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);
}
示例14: writeDesc
import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet) {
super.writeDesc(packet);
packet.writeShort(currentfreq);
}
示例15: writeDesc
import codechicken.lib.data.MCDataOutput; //导入依赖的package包/类
@Override
public void writeDesc(MCDataOutput packet) {
packet.writeByte(state);
}