Checking in work so far on a 1.13 blockstate deserializer (incomplete, but have at it).

This commit is contained in:
Dylan K. Taylor 2021-09-28 20:35:05 +01:00
parent c931c52617
commit 40cf66a730
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
5 changed files with 2183 additions and 0 deletions

View File

@ -0,0 +1,28 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\data\bedrock\blockstate;
final class BlockStateDeserializeException extends \RuntimeException{
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,131 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\data\bedrock\blockstate;
final class BlockStateNamesR13{
public const AGE = "age";
public const AGE_BIT = "age_bit";
public const ALLOW_UNDERWATER_BIT = "allow_underwater_bit";
public const ATTACHED_BIT = "attached_bit";
public const ATTACHMENT = "attachment";
public const BAMBOO_LEAF_SIZE = "bamboo_leaf_size";
public const BAMBOO_STALK_THICKNESS = "bamboo_stalk_thickness";
public const BITE_COUNTER = "bite_counter";
public const BLOCK_LIGHT_LEVEL = "block_light_level";
public const BREWING_STAND_SLOT_A_BIT = "brewing_stand_slot_a_bit";
public const BREWING_STAND_SLOT_B_BIT = "brewing_stand_slot_b_bit";
public const BREWING_STAND_SLOT_C_BIT = "brewing_stand_slot_c_bit";
public const BUTTON_PRESSED_BIT = "button_pressed_bit";
public const CAULDRON_LIQUID = "cauldron_liquid";
public const CHEMISTRY_TABLE_TYPE = "chemistry_table_type";
public const CHISEL_TYPE = "chisel_type";
public const CLUSTER_COUNT = "cluster_count";
public const COLOR = "color";
public const COLOR_BIT = "color_bit";
public const COMPOSTER_FILL_LEVEL = "composter_fill_level";
public const CONDITIONAL_BIT = "conditional_bit";
public const CORAL_COLOR = "coral_color";
public const CORAL_DIRECTION = "coral_direction";
public const CORAL_FAN_DIRECTION = "coral_fan_direction";
public const CORAL_HANG_TYPE_BIT = "coral_hang_type_bit";
public const COVERED_BIT = "covered_bit";
public const CRACKED_STATE = "cracked_state";
public const DAMAGE = "damage";
public const DEAD_BIT = "dead_bit";
public const DEPRECATED = "deprecated";
public const DIRECTION = "direction";
public const DIRT_TYPE = "dirt_type";
public const DISARMED_BIT = "disarmed_bit";
public const DOOR_HINGE_BIT = "door_hinge_bit";
public const DOUBLE_PLANT_TYPE = "double_plant_type";
public const DRAG_DOWN = "drag_down";
public const END_PORTAL_EYE_BIT = "end_portal_eye_bit";
public const EXPLODE_BIT = "explode_bit";
public const EXTINGUISHED = "extinguished";
public const FACING_DIRECTION = "facing_direction";
public const FILL_LEVEL = "fill_level";
public const FLOWER_TYPE = "flower_type";
public const GROUND_SIGN_DIRECTION = "ground_sign_direction";
public const GROWTH = "growth";
public const HANGING = "hanging";
public const HEAD_PIECE_BIT = "head_piece_bit";
public const HEIGHT = "height";
public const HUGE_MUSHROOM_BITS = "huge_mushroom_bits";
public const IN_WALL_BIT = "in_wall_bit";
public const INFINIBURN_BIT = "infiniburn_bit";
public const ITEM_FRAME_MAP_BIT = "item_frame_map_bit";
public const LEVER_DIRECTION = "lever_direction";
public const LIQUID_DEPTH = "liquid_depth";
public const MOISTURIZED_AMOUNT = "moisturized_amount";
public const MONSTER_EGG_STONE_TYPE = "monster_egg_stone_type";
public const NEW_LEAF_TYPE = "new_leaf_type";
public const NEW_LOG_TYPE = "new_log_type";
public const NO_DROP_BIT = "no_drop_bit";
public const OCCUPIED_BIT = "occupied_bit";
public const OLD_LEAF_TYPE = "old_leaf_type";
public const OLD_LOG_TYPE = "old_log_type";
public const OPEN_BIT = "open_bit";
public const OUTPUT_LIT_BIT = "output_lit_bit";
public const OUTPUT_SUBTRACT_BIT = "output_subtract_bit";
public const PERSISTENT_BIT = "persistent_bit";
public const PILLAR_AXIS = "pillar_axis";
public const PORTAL_AXIS = "portal_axis";
public const POWERED_BIT = "powered_bit";
public const PRISMARINE_BLOCK_TYPE = "prismarine_block_type";
public const RAIL_DATA_BIT = "rail_data_bit";
public const RAIL_DIRECTION = "rail_direction";
public const REDSTONE_SIGNAL = "redstone_signal";
public const REPEATER_DELAY = "repeater_delay";
public const SAND_STONE_TYPE = "sand_stone_type";
public const SAND_TYPE = "sand_type";
public const SAPLING_TYPE = "sapling_type";
public const SEA_GRASS_TYPE = "sea_grass_type";
public const SPONGE_TYPE = "sponge_type";
public const STABILITY = "stability";
public const STABILITY_CHECK = "stability_check";
public const STONE_BRICK_TYPE = "stone_brick_type";
public const STONE_SLAB_TYPE = "stone_slab_type";
public const STONE_SLAB_TYPE_2 = "stone_slab_type_2";
public const STONE_SLAB_TYPE_3 = "stone_slab_type_3";
public const STONE_SLAB_TYPE_4 = "stone_slab_type_4";
public const STONE_TYPE = "stone_type";
public const STRIPPED_BIT = "stripped_bit";
public const STRUCTURE_BLOCK_TYPE = "structure_block_type";
public const STRUCTURE_VOID_TYPE = "structure_void_type";
public const SUSPENDED_BIT = "suspended_bit";
public const TALL_GRASS_TYPE = "tall_grass_type";
public const TOGGLE_BIT = "toggle_bit";
public const TOP_SLOT_BIT = "top_slot_bit";
public const TORCH_FACING_DIRECTION = "torch_facing_direction";
public const TRIGGERED_BIT = "triggered_bit";
public const TURTLE_EGG_COUNT = "turtle_egg_count";
public const UPDATE_BIT = "update_bit";
public const UPPER_BLOCK_BIT = "upper_block_bit";
public const UPSIDE_DOWN_BIT = "upside_down_bit";
public const VINE_DIRECTION_BITS = "vine_direction_bits";
public const WALL_BLOCK_TYPE = "wall_block_type";
public const WEIRDO_DIRECTION = "weirdo_direction";
public const WOOD_TYPE = "wood_type";
}

View File

@ -0,0 +1,271 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\data\bedrock\blockstate;
use pocketmine\block\utils\BellAttachmentType;
use pocketmine\block\utils\CoralType;
use pocketmine\block\utils\DyeColor;
use pocketmine\block\utils\SlabType;
use pocketmine\data\bedrock\blockstate\BlockStateStringValuesR13 as StringValues;
use pocketmine\math\Axis;
use pocketmine\math\Facing;
use pocketmine\nbt\tag\ByteTag;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\nbt\tag\IntTag;
use pocketmine\nbt\tag\StringTag;
use pocketmine\nbt\tag\Tag;
use function get_class;
final class BlockStateReader{
private CompoundTag $nbt;
public function __construct(CompoundTag $nbt){
$this->nbt = $nbt;
}
public function getNbt() : CompoundTag{ return $this->nbt; }
public function missingOrWrongTypeException(string $name, ?Tag $tag) : BlockStateDeserializeException{
return new BlockStateDeserializeException("Property \"$name\" " . ($tag !== null ? "has unexpected type " . get_class($tag) : "is missing"));
}
public function badValueException(string $name, string $stringifiedValue, ?string $reason = null) : BlockStateDeserializeException{
return new BlockStateDeserializeException(
"Property \"$name\" has unexpected value \"$stringifiedValue\"" . (
$reason !== null ? " ($reason)" : ""
));
}
/** @throws BlockStateDeserializeException */
public function readBool(string $name) : bool{
$tag = $this->nbt->getTag($name);
if($tag instanceof ByteTag){
switch($tag->getValue()){
case 0: return false;
case 1: return true;
default: throw $this->badValueException($name, (string) $tag->getValue());
}
}
throw $this->missingOrWrongTypeException($name, $tag);
}
/** @throws BlockStateDeserializeException */
public function readInt(string $name) : int{
$tag = $this->nbt->getTag($name);
if($tag instanceof IntTag){
return $tag->getValue();
}
throw $this->missingOrWrongTypeException($name, $tag);
}
/** @throws BlockStateDeserializeException */
public function readBoundedInt(string $name, int $min, int $max) : int{
$result = $this->readInt($name);
if($result < $min || $result > $max){
throw $this->badValueException($name, (string) $result, "Must be inside the range $min ... $max");
}
return $result;
}
/** @throws BlockStateDeserializeException */
public function readString(string $name) : string{
//TODO: only allow a specific set of values (strings are primarily used for enums)
$tag = $this->nbt->getTag($name);
if($tag instanceof StringTag){
return $tag->getValue();
}
throw $this->missingOrWrongTypeException($name, $tag);
}
/**
* @param int[] $mapping
* @phpstan-param array<int, int> $mapping
* @phpstan-return int
* @throws BlockStateDeserializeException
*/
private function parseFacingValue(int $value, array $mapping) : int{
$result = $mapping[$value] ?? null;
if($result === null){
throw new BlockStateDeserializeException("Unmapped facing value " . $value);
}
return $result;
}
/** @throws BlockStateDeserializeException */
public function readFacingDirection() : int{
return $this->parseFacingValue($this->readInt(BlockStateNamesR13::FACING_DIRECTION), [
0 => Facing::DOWN,
1 => Facing::UP,
2 => Facing::NORTH,
3 => Facing::SOUTH,
4 => Facing::WEST,
5 => Facing::EAST
]);
}
/** @throws BlockStateDeserializeException */
public function readHorizontalFacing() : int{
return $this->parseFacingValue($this->readInt(BlockStateNamesR13::FACING_DIRECTION), [
0 => Facing::NORTH, //should be illegal, but 1.13 allows it
1 => Facing::NORTH, //also should be illegal
2 => Facing::NORTH,
3 => Facing::SOUTH,
4 => Facing::WEST,
5 => Facing::EAST
]);
}
/** @throws BlockStateDeserializeException */
public function readWeirdoHorizontalFacing() : int{
return $this->parseFacingValue($this->readInt(BlockStateNamesR13::WEIRDO_DIRECTION), [
0 => Facing::EAST,
1 => Facing::WEST,
2 => Facing::SOUTH,
3 => Facing::NORTH
]);
}
/** @throws BlockStateDeserializeException */
public function readLegacyHorizontalFacing() : int{
return $this->parseFacingValue($this->readInt(BlockStateNamesR13::DIRECTION), [
0 => Facing::SOUTH,
1 => Facing::WEST,
2 => Facing::NORTH,
3 => Facing::EAST
]);
}
/** @throws BlockStateDeserializeException */
public function readColor() : DyeColor{
// * color (StringTag) = black, blue, brown, cyan, gray, green, light_blue, lime, magenta, orange, pink, purple, red, silver, white, yellow
return match($color = $this->readString(BlockStateNamesR13::COLOR)){
StringValues::COLOR_BLACK => DyeColor::BLACK(),
StringValues::COLOR_BLUE => DyeColor::BLUE(),
StringValues::COLOR_BROWN => DyeColor::BROWN(),
StringValues::COLOR_CYAN => DyeColor::CYAN(),
StringValues::COLOR_GRAY => DyeColor::GRAY(),
StringValues::COLOR_GREEN => DyeColor::GREEN(),
StringValues::COLOR_LIGHT_BLUE => DyeColor::LIGHT_BLUE(),
StringValues::COLOR_LIME => DyeColor::LIME(),
StringValues::COLOR_MAGENTA => DyeColor::MAGENTA(),
StringValues::COLOR_ORANGE => DyeColor::ORANGE(),
StringValues::COLOR_PINK => DyeColor::PINK(),
StringValues::COLOR_PURPLE => DyeColor::PURPLE(),
StringValues::COLOR_RED => DyeColor::RED(),
StringValues::COLOR_SILVER => DyeColor::LIGHT_GRAY(),
StringValues::COLOR_WHITE => DyeColor::WHITE(),
StringValues::COLOR_YELLOW => DyeColor::YELLOW(),
default => throw $this->badValueException(BlockStateNamesR13::COLOR, $color),
};
}
/** @throws BlockStateDeserializeException */
public function readCoralFacing() : int{
return $this->parseFacingValue($this->readInt(BlockStateNamesR13::CORAL_DIRECTION), [
0 => Facing::WEST,
1 => Facing::EAST,
2 => Facing::NORTH,
3 => Facing::SOUTH
]);
}
/** @throws BlockStateDeserializeException */
public function readFacingWithoutDown() : int{
$result = $this->readFacingDirection();
if($result === Facing::DOWN){ //shouldn't be legal, but 1.13 allows it
$result = Facing::UP;
}
return $result;
}
public function readFacingWithoutUp() : int{
$result = $this->readFacingDirection();
if($result === Facing::UP){
$result = Facing::DOWN; //shouldn't be legal, but 1.13 allows it
}
return $result;
}
/**
* @phpstan-return Axis::*
* @throws BlockStateDeserializeException
*/
public function readPillarAxis() : int{
$rawValue = $this->readString(BlockStateNamesR13::PILLAR_AXIS);
$value = [
StringValues::PILLAR_AXIS_X => Axis::X,
StringValues::PILLAR_AXIS_Y => Axis::Y,
StringValues::PILLAR_AXIS_Z => Axis::Z
][$rawValue] ?? null;
if($value === null){
throw $this->badValueException(BlockStateNamesR13::PILLAR_AXIS, $rawValue, "Invalid axis value");
}
return $value;
}
/** @throws BlockStateDeserializeException */
public function readSlabPosition() : SlabType{
return $this->readBool(BlockStateNamesR13::TOP_SLOT_BIT) ? SlabType::TOP() : SlabType::BOTTOM();
}
/**
* @phpstan-return Facing::UP|Facing::NORTH|Facing::SOUTH|Facing::WEST|Facing::EAST
* @throws BlockStateDeserializeException
*/
public function readTorchFacing() : int{
return match($rawValue = $this->readString(BlockStateNamesR13::TORCH_FACING_DIRECTION)){
StringValues::TORCH_FACING_DIRECTION_EAST => Facing::EAST,
StringValues::TORCH_FACING_DIRECTION_NORTH => Facing::NORTH,
StringValues::TORCH_FACING_DIRECTION_SOUTH => Facing::SOUTH,
StringValues::TORCH_FACING_DIRECTION_TOP => Facing::UP,
StringValues::TORCH_FACING_DIRECTION_UNKNOWN => Facing::UP, //should be illegal, but 1.13 allows it
StringValues::TORCH_FACING_DIRECTION_WEST => Facing::WEST,
default => throw $this->badValueException(BlockStateNamesR13::TORCH_FACING_DIRECTION, $rawValue, "Invalid torch facing"),
};
}
/** @throws BlockStateDeserializeException */
public function readCoralType() : CoralType{
return match($type = $this->readString(BlockStateNamesR13::CORAL_COLOR)){
StringValues::CORAL_COLOR_BLUE => CoralType::TUBE(),
StringValues::CORAL_COLOR_PINK => CoralType::BRAIN(),
StringValues::CORAL_COLOR_PURPLE => CoralType::BUBBLE(),
StringValues::CORAL_COLOR_RED => CoralType::FIRE(),
StringValues::CORAL_COLOR_YELLOW => CoralType::HORN(),
default => throw $this->badValueException(BlockStateNamesR13::CORAL_COLOR, $type),
};
}
/** @throws BlockStateDeserializeException */
public function readBellAttachmentType() : BellAttachmentType{
return match($type = $this->readString(BlockStateNamesR13::ATTACHMENT)){
StringValues::ATTACHMENT_HANGING => BellAttachmentType::CEILING(),
StringValues::ATTACHMENT_STANDING => BellAttachmentType::FLOOR(),
StringValues::ATTACHMENT_SIDE => BellAttachmentType::ONE_WALL(),
StringValues::ATTACHMENT_MULTIPLE => BellAttachmentType::TWO_WALLS(),
default => throw $this->badValueException(BlockStateNamesR13::ATTACHMENT, $type),
};
}
}

View File

@ -0,0 +1,269 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\data\bedrock\blockstate;
final class BlockStateStringValuesR13{
public const ATTACHMENT_HANGING = "hanging";
public const ATTACHMENT_MULTIPLE = "multiple";
public const ATTACHMENT_SIDE = "side";
public const ATTACHMENT_STANDING = "standing";
public const BAMBOO_LEAF_SIZE_LARGE_LEAVES = "large_leaves";
public const BAMBOO_LEAF_SIZE_NO_LEAVES = "no_leaves";
public const BAMBOO_LEAF_SIZE_SMALL_LEAVES = "small_leaves";
public const BAMBOO_STALK_THICKNESS_THICK = "thick";
public const BAMBOO_STALK_THICKNESS_THIN = "thin";
public const CAULDRON_LIQUID_LAVA = "lava";
public const CAULDRON_LIQUID_WATER = "water";
public const CHEMISTRY_TABLE_TYPE_COMPOUND_CREATOR = "compound_creator";
public const CHEMISTRY_TABLE_TYPE_ELEMENT_CONSTRUCTOR = "element_constructor";
public const CHEMISTRY_TABLE_TYPE_LAB_TABLE = "lab_table";
public const CHEMISTRY_TABLE_TYPE_MATERIAL_REDUCER = "material_reducer";
public const CHISEL_TYPE_CHISELED = "chiseled";
public const CHISEL_TYPE_DEFAULT = "default";
public const CHISEL_TYPE_LINES = "lines";
public const CHISEL_TYPE_SMOOTH = "smooth";
public const COLOR_BLACK = "black";
public const COLOR_BLUE = "blue";
public const COLOR_BROWN = "brown";
public const COLOR_CYAN = "cyan";
public const COLOR_GRAY = "gray";
public const COLOR_GREEN = "green";
public const COLOR_LIGHT_BLUE = "light_blue";
public const COLOR_LIME = "lime";
public const COLOR_MAGENTA = "magenta";
public const COLOR_ORANGE = "orange";
public const COLOR_PINK = "pink";
public const COLOR_PURPLE = "purple";
public const COLOR_RED = "red";
public const COLOR_SILVER = "silver";
public const COLOR_WHITE = "white";
public const COLOR_YELLOW = "yellow";
public const CORAL_COLOR_BLUE = "blue";
public const CORAL_COLOR_PINK = "pink";
public const CORAL_COLOR_PURPLE = "purple";
public const CORAL_COLOR_RED = "red";
public const CORAL_COLOR_YELLOW = "yellow";
public const CRACKED_STATE_CRACKED = "cracked";
public const CRACKED_STATE_MAX_CRACKED = "max_cracked";
public const CRACKED_STATE_NO_CRACKS = "no_cracks";
public const DAMAGE_BROKEN = "broken";
public const DAMAGE_SLIGHTLY_DAMAGED = "slightly_damaged";
public const DAMAGE_UNDAMAGED = "undamaged";
public const DAMAGE_VERY_DAMAGED = "very_damaged";
public const DIRT_TYPE_COARSE = "coarse";
public const DIRT_TYPE_NORMAL = "normal";
public const DOUBLE_PLANT_TYPE_FERN = "fern";
public const DOUBLE_PLANT_TYPE_GRASS = "grass";
public const DOUBLE_PLANT_TYPE_PAEONIA = "paeonia";
public const DOUBLE_PLANT_TYPE_ROSE = "rose";
public const DOUBLE_PLANT_TYPE_SUNFLOWER = "sunflower";
public const DOUBLE_PLANT_TYPE_SYRINGA = "syringa";
public const FLOWER_TYPE_ALLIUM = "allium";
public const FLOWER_TYPE_CORNFLOWER = "cornflower";
public const FLOWER_TYPE_HOUSTONIA = "houstonia";
public const FLOWER_TYPE_LILY_OF_THE_VALLEY = "lily_of_the_valley";
public const FLOWER_TYPE_ORCHID = "orchid";
public const FLOWER_TYPE_OXEYE = "oxeye";
public const FLOWER_TYPE_POPPY = "poppy";
public const FLOWER_TYPE_TULIP_ORANGE = "tulip_orange";
public const FLOWER_TYPE_TULIP_PINK = "tulip_pink";
public const FLOWER_TYPE_TULIP_RED = "tulip_red";
public const FLOWER_TYPE_TULIP_WHITE = "tulip_white";
public const LEVER_DIRECTION_DOWN_EAST_WEST = "down_east_west";
public const LEVER_DIRECTION_DOWN_NORTH_SOUTH = "down_north_south";
public const LEVER_DIRECTION_EAST = "east";
public const LEVER_DIRECTION_NORTH = "north";
public const LEVER_DIRECTION_SOUTH = "south";
public const LEVER_DIRECTION_UP_EAST_WEST = "up_east_west";
public const LEVER_DIRECTION_UP_NORTH_SOUTH = "up_north_south";
public const LEVER_DIRECTION_WEST = "west";
public const MONSTER_EGG_STONE_TYPE_CHISELED_STONE_BRICK = "chiseled_stone_brick";
public const MONSTER_EGG_STONE_TYPE_COBBLESTONE = "cobblestone";
public const MONSTER_EGG_STONE_TYPE_CRACKED_STONE_BRICK = "cracked_stone_brick";
public const MONSTER_EGG_STONE_TYPE_MOSSY_STONE_BRICK = "mossy_stone_brick";
public const MONSTER_EGG_STONE_TYPE_STONE = "stone";
public const MONSTER_EGG_STONE_TYPE_STONE_BRICK = "stone_brick";
public const NEW_LEAF_TYPE_ACACIA = "acacia";
public const NEW_LEAF_TYPE_DARK_OAK = "dark_oak";
public const NEW_LOG_TYPE_ACACIA = "acacia";
public const NEW_LOG_TYPE_DARK_OAK = "dark_oak";
public const OLD_LEAF_TYPE_BIRCH = "birch";
public const OLD_LEAF_TYPE_JUNGLE = "jungle";
public const OLD_LEAF_TYPE_OAK = "oak";
public const OLD_LEAF_TYPE_SPRUCE = "spruce";
public const OLD_LOG_TYPE_BIRCH = "birch";
public const OLD_LOG_TYPE_JUNGLE = "jungle";
public const OLD_LOG_TYPE_OAK = "oak";
public const OLD_LOG_TYPE_SPRUCE = "spruce";
public const PILLAR_AXIS_X = "x";
public const PILLAR_AXIS_Y = "y";
public const PILLAR_AXIS_Z = "z";
public const PORTAL_AXIS_UNKNOWN = "unknown";
public const PORTAL_AXIS_X = "x";
public const PORTAL_AXIS_Z = "z";
public const PRISMARINE_BLOCK_TYPE_BRICKS = "bricks";
public const PRISMARINE_BLOCK_TYPE_DARK = "dark";
public const PRISMARINE_BLOCK_TYPE_DEFAULT = "default";
public const SAND_STONE_TYPE_CUT = "cut";
public const SAND_STONE_TYPE_DEFAULT = "default";
public const SAND_STONE_TYPE_HEIROGLYPHS = "heiroglyphs";
public const SAND_STONE_TYPE_SMOOTH = "smooth";
public const SAND_TYPE_NORMAL = "normal";
public const SAND_TYPE_RED = "red";
public const SAPLING_TYPE_ACACIA = "acacia";
public const SAPLING_TYPE_BIRCH = "birch";
public const SAPLING_TYPE_DARK_OAK = "dark_oak";
public const SAPLING_TYPE_JUNGLE = "jungle";
public const SAPLING_TYPE_OAK = "oak";
public const SAPLING_TYPE_SPRUCE = "spruce";
public const SEA_GRASS_TYPE_DEFAULT = "default";
public const SEA_GRASS_TYPE_DOUBLE_BOT = "double_bot";
public const SEA_GRASS_TYPE_DOUBLE_TOP = "double_top";
public const SPONGE_TYPE_DRY = "dry";
public const SPONGE_TYPE_WET = "wet";
public const STONE_BRICK_TYPE_CHISELED = "chiseled";
public const STONE_BRICK_TYPE_CRACKED = "cracked";
public const STONE_BRICK_TYPE_DEFAULT = "default";
public const STONE_BRICK_TYPE_MOSSY = "mossy";
public const STONE_BRICK_TYPE_SMOOTH = "smooth";
public const STONE_SLAB_TYPE_BRICK = "brick";
public const STONE_SLAB_TYPE_COBBLESTONE = "cobblestone";
public const STONE_SLAB_TYPE_NETHER_BRICK = "nether_brick";
public const STONE_SLAB_TYPE_QUARTZ = "quartz";
public const STONE_SLAB_TYPE_SANDSTONE = "sandstone";
public const STONE_SLAB_TYPE_SMOOTH_STONE = "smooth_stone";
public const STONE_SLAB_TYPE_STONE_BRICK = "stone_brick";
public const STONE_SLAB_TYPE_WOOD = "wood";
public const STONE_SLAB_TYPE_2_MOSSY_COBBLESTONE = "mossy_cobblestone";
public const STONE_SLAB_TYPE_2_PRISMARINE_BRICK = "prismarine_brick";
public const STONE_SLAB_TYPE_2_PRISMARINE_DARK = "prismarine_dark";
public const STONE_SLAB_TYPE_2_PRISMARINE_ROUGH = "prismarine_rough";
public const STONE_SLAB_TYPE_2_PURPUR = "purpur";
public const STONE_SLAB_TYPE_2_RED_NETHER_BRICK = "red_nether_brick";
public const STONE_SLAB_TYPE_2_RED_SANDSTONE = "red_sandstone";
public const STONE_SLAB_TYPE_2_SMOOTH_SANDSTONE = "smooth_sandstone";
public const STONE_SLAB_TYPE_3_ANDESITE = "andesite";
public const STONE_SLAB_TYPE_3_DIORITE = "diorite";
public const STONE_SLAB_TYPE_3_END_STONE_BRICK = "end_stone_brick";
public const STONE_SLAB_TYPE_3_GRANITE = "granite";
public const STONE_SLAB_TYPE_3_POLISHED_ANDESITE = "polished_andesite";
public const STONE_SLAB_TYPE_3_POLISHED_DIORITE = "polished_diorite";
public const STONE_SLAB_TYPE_3_POLISHED_GRANITE = "polished_granite";
public const STONE_SLAB_TYPE_3_SMOOTH_RED_SANDSTONE = "smooth_red_sandstone";
public const STONE_SLAB_TYPE_4_CUT_RED_SANDSTONE = "cut_red_sandstone";
public const STONE_SLAB_TYPE_4_CUT_SANDSTONE = "cut_sandstone";
public const STONE_SLAB_TYPE_4_MOSSY_STONE_BRICK = "mossy_stone_brick";
public const STONE_SLAB_TYPE_4_SMOOTH_QUARTZ = "smooth_quartz";
public const STONE_SLAB_TYPE_4_STONE = "stone";
public const STONE_TYPE_ANDESITE = "andesite";
public const STONE_TYPE_ANDESITE_SMOOTH = "andesite_smooth";
public const STONE_TYPE_DIORITE = "diorite";
public const STONE_TYPE_DIORITE_SMOOTH = "diorite_smooth";
public const STONE_TYPE_GRANITE = "granite";
public const STONE_TYPE_GRANITE_SMOOTH = "granite_smooth";
public const STONE_TYPE_STONE = "stone";
public const STRUCTURE_BLOCK_TYPE_CORNER = "corner";
public const STRUCTURE_BLOCK_TYPE_DATA = "data";
public const STRUCTURE_BLOCK_TYPE_EXPORT = "export";
public const STRUCTURE_BLOCK_TYPE_INVALID = "invalid";
public const STRUCTURE_BLOCK_TYPE_LOAD = "load";
public const STRUCTURE_BLOCK_TYPE_SAVE = "save";
public const STRUCTURE_VOID_TYPE_AIR = "air";
public const STRUCTURE_VOID_TYPE_VOID = "void";
public const TALL_GRASS_TYPE_DEFAULT = "default";
public const TALL_GRASS_TYPE_FERN = "fern";
public const TALL_GRASS_TYPE_SNOW = "snow";
public const TALL_GRASS_TYPE_TALL = "tall";
public const TORCH_FACING_DIRECTION_EAST = "east";
public const TORCH_FACING_DIRECTION_NORTH = "north";
public const TORCH_FACING_DIRECTION_SOUTH = "south";
public const TORCH_FACING_DIRECTION_TOP = "top";
public const TORCH_FACING_DIRECTION_UNKNOWN = "unknown";
public const TORCH_FACING_DIRECTION_WEST = "west";
public const TURTLE_EGG_COUNT_FOUR_EGG = "four_egg";
public const TURTLE_EGG_COUNT_ONE_EGG = "one_egg";
public const TURTLE_EGG_COUNT_THREE_EGG = "three_egg";
public const TURTLE_EGG_COUNT_TWO_EGG = "two_egg";
public const WALL_BLOCK_TYPE_ANDESITE = "andesite";
public const WALL_BLOCK_TYPE_BRICK = "brick";
public const WALL_BLOCK_TYPE_COBBLESTONE = "cobblestone";
public const WALL_BLOCK_TYPE_DIORITE = "diorite";
public const WALL_BLOCK_TYPE_END_BRICK = "end_brick";
public const WALL_BLOCK_TYPE_GRANITE = "granite";
public const WALL_BLOCK_TYPE_MOSSY_COBBLESTONE = "mossy_cobblestone";
public const WALL_BLOCK_TYPE_MOSSY_STONE_BRICK = "mossy_stone_brick";
public const WALL_BLOCK_TYPE_NETHER_BRICK = "nether_brick";
public const WALL_BLOCK_TYPE_PRISMARINE = "prismarine";
public const WALL_BLOCK_TYPE_RED_NETHER_BRICK = "red_nether_brick";
public const WALL_BLOCK_TYPE_RED_SANDSTONE = "red_sandstone";
public const WALL_BLOCK_TYPE_SANDSTONE = "sandstone";
public const WALL_BLOCK_TYPE_STONE_BRICK = "stone_brick";
public const WOOD_TYPE_ACACIA = "acacia";
public const WOOD_TYPE_BIRCH = "birch";
public const WOOD_TYPE_DARK_OAK = "dark_oak";
public const WOOD_TYPE_JUNGLE = "jungle";
public const WOOD_TYPE_OAK = "oak";
public const WOOD_TYPE_SPRUCE = "spruce";
}