mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 14:35:35 +00:00
Fixed PMF metadata set
This commit is contained in:
parent
e81d68c8d0
commit
5faeff9e16
@ -341,11 +341,9 @@ class PMFLevel extends PMF{
|
|||||||
$old_b = ord($this->chunks[$index][$Y]{$bindex});
|
$old_b = ord($this->chunks[$index][$Y]{$bindex});
|
||||||
$old_m = ord($this->chunks[$index][$Y]{$mindex});
|
$old_m = ord($this->chunks[$index][$Y]{$mindex});
|
||||||
if(($y & 1) === 0){
|
if(($y & 1) === 0){
|
||||||
$o_m = $old_m & 0x0F;
|
$m = ($old_m & 0xF0) | $meta;
|
||||||
$m = ($o_m << 4) | $meta;
|
|
||||||
}else{
|
}else{
|
||||||
$o_m = $old_m >> 4;
|
$m = ($meta << 4) | ($old_m & 0x0F);
|
||||||
$m = ($meta << 4) | $o_m;
|
|
||||||
}
|
}
|
||||||
if($old_b !== $block or $old_m !== $m){
|
if($old_b !== $block or $old_m !== $m){
|
||||||
$this->chunks[$index][$Y]{$bindex} = chr($block);
|
$this->chunks[$index][$Y]{$bindex} = chr($block);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user