Java Code Examples for net.minecraft.network.PacketBuffer#writeEnumValue()

The following examples show how to use net.minecraft.network.PacketBuffer#writeEnumValue() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MessageStartPiloting.java    From Valkyrien-Skies with Apache License 2.0 5 votes vote down vote up
@Override
public void toBytes(ByteBuf buf) {
    PacketBuffer packetBuf = new PacketBuffer(buf);
    packetBuf.writeInt(posToStartPiloting.getX());
    packetBuf.writeInt(posToStartPiloting.getY());
    packetBuf.writeInt(posToStartPiloting.getZ());
    //use absolute coordinates instead of writeBlockPos in case we ever add compatibility with cubic chunks
    packetBuf.writeBoolean(setPhysicsWrapperEntityToPilot);
    packetBuf.writeEnumValue(controlType);
}
 
Example 2
Source File: DataSerializersTFC.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void write(PacketBuffer buf, Gender value) {
	buf.writeEnumValue(value);
}
 
Example 3
Source File: DataSerializersTFC.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void write(PacketBuffer buf, TigerType value) {
	buf.writeEnumValue(value);
}
 
Example 4
Source File: DataSerializersTFC.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void write(PacketBuffer buf, BearType value) {
	buf.writeEnumValue(value);
}
 
Example 5
Source File: DataSerializersTFC.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void write(PacketBuffer buf, ElephantType value) {
	buf.writeEnumValue(value);
}
 
Example 6
Source File: DataSerializersTFC.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void write(PacketBuffer buf, BoarStage value) {
	buf.writeEnumValue(value);
}
 
Example 7
Source File: DataSerializersTFC.java    From TFC2 with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void write(PacketBuffer buf, BigCatType value) {
	buf.writeEnumValue(value);
}
 
Example 8
Source File: Command.java    From OpenModsLib with MIT License 4 votes vote down vote up
public void writeToStream(PacketBuffer output) throws IOException {
	output.writeEnumValue(type());
	writeDataToStream(output);
}