143 lines
3.7 KiB
Go
143 lines
3.7 KiB
Go
// Code generated by the FlatBuffers compiler. DO NOT EDIT.
|
|
|
|
package gmb
|
|
|
|
import (
|
|
flatbuffers "github.com/google/flatbuffers/go"
|
|
)
|
|
|
|
type BlockSnapshot struct {
|
|
_tab flatbuffers.Table
|
|
}
|
|
|
|
func GetRootAsBlockSnapshot(buf []byte, offset flatbuffers.UOffsetT) *BlockSnapshot {
|
|
n := flatbuffers.GetUOffsetT(buf[offset:])
|
|
x := &BlockSnapshot{}
|
|
x.Init(buf, n+offset)
|
|
return x
|
|
}
|
|
|
|
func FinishBlockSnapshotBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
|
builder.Finish(offset)
|
|
}
|
|
|
|
func GetSizePrefixedRootAsBlockSnapshot(buf []byte, offset flatbuffers.UOffsetT) *BlockSnapshot {
|
|
n := flatbuffers.GetUOffsetT(buf[offset+flatbuffers.SizeUint32:])
|
|
x := &BlockSnapshot{}
|
|
x.Init(buf, n+offset+flatbuffers.SizeUint32)
|
|
return x
|
|
}
|
|
|
|
func FinishSizePrefixedBlockSnapshotBuffer(builder *flatbuffers.Builder, offset flatbuffers.UOffsetT) {
|
|
builder.FinishSizePrefixed(offset)
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) Init(buf []byte, i flatbuffers.UOffsetT) {
|
|
rcv._tab.Bytes = buf
|
|
rcv._tab.Pos = i
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) Table() flatbuffers.Table {
|
|
return rcv._tab
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) Dimension() []byte {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
|
|
if o != 0 {
|
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) X() int32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) MutateX(n int32) bool {
|
|
return rcv._tab.MutateInt32Slot(6, n)
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) Y() int32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) MutateY(n int32) bool {
|
|
return rcv._tab.MutateInt32Slot(8, n)
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) Z() int32 {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
|
|
if o != 0 {
|
|
return rcv._tab.GetInt32(o + rcv._tab.Pos)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) MutateZ(n int32) bool {
|
|
return rcv._tab.MutateInt32Slot(10, n)
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) Block() []byte {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(12))
|
|
if o != 0 {
|
|
return rcv._tab.ByteVector(o + rcv._tab.Pos)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) Properties(obj *BlockProperty, j int) bool {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
|
|
if o != 0 {
|
|
x := rcv._tab.Vector(o)
|
|
x += flatbuffers.UOffsetT(j) * 4
|
|
x = rcv._tab.Indirect(x)
|
|
obj.Init(rcv._tab.Bytes, x)
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (rcv *BlockSnapshot) PropertiesLength() int {
|
|
o := flatbuffers.UOffsetT(rcv._tab.Offset(14))
|
|
if o != 0 {
|
|
return rcv._tab.VectorLen(o)
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func BlockSnapshotStart(builder *flatbuffers.Builder) {
|
|
builder.StartObject(6)
|
|
}
|
|
func BlockSnapshotAddDimension(builder *flatbuffers.Builder, dimension flatbuffers.UOffsetT) {
|
|
builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(dimension), 0)
|
|
}
|
|
func BlockSnapshotAddX(builder *flatbuffers.Builder, x int32) {
|
|
builder.PrependInt32Slot(1, x, 0)
|
|
}
|
|
func BlockSnapshotAddY(builder *flatbuffers.Builder, y int32) {
|
|
builder.PrependInt32Slot(2, y, 0)
|
|
}
|
|
func BlockSnapshotAddZ(builder *flatbuffers.Builder, z int32) {
|
|
builder.PrependInt32Slot(3, z, 0)
|
|
}
|
|
func BlockSnapshotAddBlock(builder *flatbuffers.Builder, block flatbuffers.UOffsetT) {
|
|
builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(block), 0)
|
|
}
|
|
func BlockSnapshotAddProperties(builder *flatbuffers.Builder, properties flatbuffers.UOffsetT) {
|
|
builder.PrependUOffsetTSlot(5, flatbuffers.UOffsetT(properties), 0)
|
|
}
|
|
func BlockSnapshotStartPropertiesVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT {
|
|
return builder.StartVector(4, numElems, 4)
|
|
}
|
|
func BlockSnapshotEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
|
|
return builder.EndObject()
|
|
}
|