mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 10:19:39 +00:00
No need for a try catch statement around reading a file
This commit is contained in:
parent
35d1d0080a
commit
6166c90bfd
@ -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 = [];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user