mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-11 05:52:05 +00:00
Remove deprecated and unused methods from SubChunk
- Remove deprecated getBlockLayers() method that was replaced by getBlockLayer() and getLiquidLayer() - Remove setBlockLayer() and setLiquidLayer() setter methods as layers are now managed internally - Simplifies the API and prevents external mutation of internal layer state
This commit is contained in:
parent
72781f4042
commit
48cc87d066
@ -104,31 +104,14 @@ class SubChunk{
|
||||
$this->blockLayer->set($x, $y, $z, $block);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use getBlockLayer() and getLiquidLayer() instead
|
||||
* @return PalettedBlockArray[]
|
||||
* @phpstan-return list<PalettedBlockArray>
|
||||
*/
|
||||
public function getBlockLayers() : array{
|
||||
return [$this->blockLayer, $this->liquidLayer];
|
||||
}
|
||||
|
||||
public function getBlockLayer() : PalettedBlockArray{
|
||||
return $this->blockLayer;
|
||||
}
|
||||
|
||||
public function setBlockLayer(PalettedBlockArray $blockLayer) : void{
|
||||
$this->blockLayer = $blockLayer;
|
||||
}
|
||||
|
||||
public function getLiquidLayer() : PalettedBlockArray{
|
||||
return $this->liquidLayer;
|
||||
}
|
||||
|
||||
public function setLiquidLayer(PalettedBlockArray $liquidLayer) : void{
|
||||
$this->liquidLayer = $liquidLayer;
|
||||
}
|
||||
|
||||
public function getHighestBlockAt(int $x, int $z) : ?int{
|
||||
for($y = self::EDGE_LENGTH - 1; $y >= 0; --$y){
|
||||
if($this->blockLayer->get($x, $y, $z) !== $this->emptyBlockId){
|
||||
|
Loading…
x
Reference in New Issue
Block a user