No need for a try catch statement around reading a file

This commit is contained in:
Stephen 2019-11-07 19:45:47 -05:00
parent 35d1d0080a
commit 6166c90bfd

View File

@ -52,13 +52,7 @@ final class RuntimeBlockMapping{
public static function init() : void{
$legacyIdMap = json_decode(file_get_contents(\pocketmine\RESOURCE_PATH . "vanilla/block_id_map.json"), true);
try{
/** @var CompoundTag $tag */
$tag = (new BigEndianNBTStream())->read(file_get_contents(\pocketmine\RESOURCE_PATH . "vanilla/runtime_block_states.dat"));
}catch(BinaryDataException $e){
throw new \RuntimeException("", 0, $e);
}
$tag = (new BigEndianNBTStream())->read(file_get_contents(\pocketmine\RESOURCE_PATH . "vanilla/runtime_block_states.dat"));
$decompressed = [];