PocketMine-MP
5.28.1 git-88cdc2eb67c40075559c3ef51418b418cd5488e9
Loading...
Searching...
No Matches
BiomeCoordinateData.php
1
<?php
2
3
/*
4
* This file is part of BedrockProtocol.
5
* Copyright (C) 2014-2022 PocketMine Team <https://github.com/pmmp/BedrockProtocol>
6
*
7
* BedrockProtocol is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU Lesser General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*/
12
13
declare(strict_types=1);
14
15
namespace
pocketmine\network\mcpe\protocol\types\biome\chunkgen;
16
17
use
pocketmine\network\mcpe\protocol\serializer\PacketSerializer
;
18
19
final
class
BiomeCoordinateData
{
20
21
public
function
__construct(
22
private
int
$minValueType,
23
private
int
$minValue,
24
private
int
$maxValueType,
25
private
int
$maxValue,
26
private
int
$gridOffset,
27
private
int
$gridStepSize,
28
private
int
$distribution
29
){}
30
31
public
function
getMinValueType() :
int
{
return
$this->minValueType; }
32
33
public
function
getMinValue() :
int
{
return
$this->minValue; }
34
35
public
function
getMaxValueType() :
int
{
return
$this->maxValueType; }
36
37
public
function
getMaxValue() :
int
{
return
$this->maxValue; }
38
39
public
function
getGridOffset() :
int
{
return
$this->gridOffset; }
40
41
public
function
getGridStepSize() :
int
{
return
$this->gridStepSize; }
42
43
public
function
getDistribution() :
int
{
return
$this->distribution; }
44
45
public
static
function
read(
PacketSerializer
$in) :
self
{
46
$minValueType = $in->
getVarInt
();
47
$minValue = $in->
getLShort
();
48
$maxValueType = $in->
getVarInt
();
49
$maxValue = $in->
getLShort
();
50
$gridOffset = $in->
getLInt
();
51
$gridStepSize = $in->
getLInt
();
52
$distribution = $in->
getVarInt
();
53
54
return
new
self
(
55
$minValueType,
56
$minValue,
57
$maxValueType,
58
$maxValue,
59
$gridOffset,
60
$gridStepSize,
61
$distribution
62
);
63
}
64
65
public
function
write(
PacketSerializer
$out) :
void
{
66
67
}
68
}
pocketmine\network\mcpe\protocol\serializer\PacketSerializer
Definition
bedrock-protocol/src/serializer/PacketSerializer.php:66
pocketmine\network\mcpe\protocol\types\biome\chunkgen\BiomeCoordinateData
Definition
BiomeCoordinateData.php:19
pocketmine\utils\BinaryStream\getLShort
getLShort()
Definition
BinaryStream.php:149
pocketmine\utils\BinaryStream\getVarInt
getVarInt()
Definition
BinaryStream.php:324
pocketmine\utils\BinaryStream\getLInt
getLInt()
Definition
BinaryStream.php:205
vendor
pocketmine
bedrock-protocol
src
types
biome
chunkgen
BiomeCoordinateData.php
Generated by
1.12.0