Created
April 27, 2017 21:12
-
-
Save jasonw4331/64b5b689f15b1a6c12c922d7a05a9efc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function fixBlockIds() { | |
foreach($this->blocks as $k => $block) { | |
$replace = null; | |
switch($block->getId()) { | |
case 126: | |
$replace = Block::get(Block::WOOD_SLAB, $block->getDamage()); | |
break; | |
case 95: | |
$replace = Block::get(Block::GLASS); | |
break; | |
case 160: | |
$replace = Block::get(Block::GLASS_PANE); | |
break; | |
case 125: | |
$replace = Block::get(Block::DOUBLE_WOODEN_SLAB, $block->getDamage()); | |
break; | |
case 188: | |
$replace = Block::get(Block::FENCE, 1); | |
break; | |
case 189: | |
$replace = Block::get(Block::FENCE, 2); | |
break; | |
case 190: | |
$replace = Block::get(Block::FENCE, 3); | |
break; | |
case 191: | |
$replace = Block::get(Block::FENCE, 5); | |
break; | |
case 192: | |
$replace = Block::get(Block::FENCE, 4); | |
break; | |
default: | |
break; | |
} | |
if($replace) { | |
$replace->setComponents($block->x, $block->y, $block->z); | |
$this->blocks[$k] = $replace; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment