mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-15 18:29:46 +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{
|
public static function init() : void{
|
||||||
$legacyIdMap = json_decode(file_get_contents(\pocketmine\RESOURCE_PATH . "vanilla/block_id_map.json"), true);
|
$legacyIdMap = json_decode(file_get_contents(\pocketmine\RESOURCE_PATH . "vanilla/block_id_map.json"), true);
|
||||||
|
$tag = (new BigEndianNBTStream())->read(file_get_contents(\pocketmine\RESOURCE_PATH . "vanilla/runtime_block_states.dat"));
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
$decompressed = [];
|
$decompressed = [];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user