use of com.nukkitx.protocol.bedrock.data.structure.StructureMirror in project Protocol by CloudburstMC.
the class BedrockPacketHelper_v440 method readStructureSettings.
@Override
public StructureSettings readStructureSettings(ByteBuf buffer) {
String paletteName = this.readString(buffer);
boolean ignoringEntities = buffer.readBoolean();
boolean ignoringBlocks = buffer.readBoolean();
Vector3i size = this.readBlockPosition(buffer);
Vector3i offset = this.readBlockPosition(buffer);
long lastEditedByEntityId = VarInts.readLong(buffer);
StructureRotation rotation = StructureRotation.from(buffer.readByte());
StructureMirror mirror = StructureMirror.from(buffer.readByte());
StructureAnimationMode animationMode = StructureAnimationMode.from(buffer.readUnsignedByte());
float animationSeconds = buffer.readFloatLE();
float integrityValue = buffer.readFloatLE();
int integritySeed = buffer.readIntLE();
Vector3f pivot = this.readVector3f(buffer);
return new StructureSettings(paletteName, ignoringEntities, ignoringBlocks, size, offset, lastEditedByEntityId, rotation, mirror, animationMode, animationSeconds, integrityValue, integritySeed, pivot);
}
use of com.nukkitx.protocol.bedrock.data.structure.StructureMirror in project Protocol by CloudburstMC.
the class BedrockPacketHelper_v388 method readStructureSettings.
@Override
public StructureSettings readStructureSettings(ByteBuf buffer) {
String paletteName = this.readString(buffer);
boolean ignoringEntities = buffer.readBoolean();
boolean ignoringBlocks = buffer.readBoolean();
Vector3i size = this.readBlockPosition(buffer);
Vector3i offset = this.readBlockPosition(buffer);
long lastEditedByEntityId = VarInts.readLong(buffer);
StructureRotation rotation = StructureRotation.from(buffer.readByte());
StructureMirror mirror = StructureMirror.from(buffer.readByte());
float integrityValue = buffer.readFloatLE();
int integritySeed = buffer.readIntLE();
Vector3f pivot = this.readVector3f(buffer);
return new StructureSettings(paletteName, ignoringEntities, ignoringBlocks, size, offset, lastEditedByEntityId, rotation, mirror, StructureAnimationMode.NONE, 0, integrityValue, integritySeed, pivot);
}
use of com.nukkitx.protocol.bedrock.data.structure.StructureMirror in project Protocol by CloudburstMC.
the class BedrockPacketHelper_v361 method readStructureSettings.
@Override
public StructureSettings readStructureSettings(ByteBuf buffer) {
String paletteName = this.readString(buffer);
boolean ignoringEntities = buffer.readBoolean();
boolean ignoringBlocks = buffer.readBoolean();
Vector3i size = this.readBlockPosition(buffer);
Vector3i offset = this.readBlockPosition(buffer);
long lastEditedByEntityId = VarInts.readLong(buffer);
StructureRotation rotation = StructureRotation.from(buffer.readByte());
StructureMirror mirror = StructureMirror.from(buffer.readByte());
float integrityValue = buffer.readFloatLE();
int integritySeed = buffer.readIntLE();
return new StructureSettings(paletteName, ignoringEntities, ignoringBlocks, size, offset, lastEditedByEntityId, rotation, mirror, StructureAnimationMode.NONE, 0, integrityValue, integritySeed, Vector3f.ZERO);
}
Aggregations