// Copyright 2023 drey7925 // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // SPDX-License-Identifier: Apache-2.0 syntax = "proto3"; package perovskite.protocol.map; import "items.proto"; message ExtendedData { // Offset in the chunk, 0..4095 uint32 offset_in_chunk = 1; // Serialized data, passed to the relevant handler bytes serialized_data = 2; // Inventories stored in a block map inventories = 3; // Simple key-value storage map simple_storage = 4; } message ChunkV1 { // Array, 4096 long, containing block IDs repeated uint32 block_ids = 1 [packed=true]; // Extended data; only available on the server repeated ExtendedData extended_data = 2; } message StoredChunk { oneof chunk_data { ChunkV1 v1 = 1; } uint64 startup_counter = 127; }