Bulk addition of constant visibilities

thanks PhpStorm inspections plugin for annoying the shit out of me until
I did this.
This commit is contained in:
Dylan K. Taylor 2017-11-21 14:44:10 +00:00
parent 3f854127ca
commit 74b074753f
210 changed files with 1939 additions and 1939 deletions

View File

@ -159,11 +159,11 @@ use pocketmine\utils\UUID;
*/
class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
const SURVIVAL = 0;
const CREATIVE = 1;
const ADVENTURE = 2;
const SPECTATOR = 3;
const VIEW = Player::SPECTATOR;
public const SURVIVAL = 0;
public const CREATIVE = 1;
public const ADVENTURE = 2;
public const SPECTATOR = 3;
public const VIEW = Player::SPECTATOR;
/**
* Checks a supplied username and checks it is valid.

View File

@ -115,8 +115,8 @@ use pocketmine\utils\VersionString;
* The class that manages everything
*/
class Server{
const BROADCAST_CHANNEL_ADMINISTRATIVE = "pocketmine.broadcast.admin";
const BROADCAST_CHANNEL_USERS = "pocketmine.broadcast.user";
public const BROADCAST_CHANNEL_ADMINISTRATIVE = "pocketmine.broadcast.admin";
public const BROADCAST_CHANNEL_USERS = "pocketmine.broadcast.user";
/** @var Server */
private static $instance = null;

View File

@ -33,9 +33,9 @@ use pocketmine\Player;
class Anvil extends Fallable{
const TYPE_NORMAL = 0;
const TYPE_SLIGHTLY_DAMAGED = 4;
const TYPE_VERY_DAMAGED = 8;
public const TYPE_NORMAL = 0;
public const TYPE_SLIGHTLY_DAMAGED = 4;
public const TYPE_VERY_DAMAGED = 8;
protected $id = self::ANVIL;

View File

@ -35,8 +35,8 @@ use pocketmine\tile\Tile;
use pocketmine\utils\TextFormat;
class Bed extends Transparent{
const BITFLAG_OCCUPIED = 0x04;
const BITFLAG_HEAD = 0x08;
public const BITFLAG_OCCUPIED = 0x04;
public const BITFLAG_HEAD = 0x08;
protected $id = self::BED_BLOCK;

View File

@ -25,255 +25,255 @@ namespace pocketmine\block;
interface BlockIds{
const AIR = 0;
const STONE = 1;
const GRASS = 2;
const DIRT = 3;
const COBBLESTONE = 4;
const PLANKS = 5, WOODEN_PLANKS = 5;
const SAPLING = 6;
const BEDROCK = 7;
const FLOWING_WATER = 8;
const STILL_WATER = 9, WATER = 9;
const FLOWING_LAVA = 10;
const LAVA = 11, STILL_LAVA = 11;
const SAND = 12;
const GRAVEL = 13;
const GOLD_ORE = 14;
const IRON_ORE = 15;
const COAL_ORE = 16;
const LOG = 17, WOOD = 17;
const LEAVES = 18;
const SPONGE = 19;
const GLASS = 20;
const LAPIS_ORE = 21;
const LAPIS_BLOCK = 22;
const DISPENSER = 23;
const SANDSTONE = 24;
const NOTEBLOCK = 25, NOTE_BLOCK = 25;
const BED_BLOCK = 26;
const GOLDEN_RAIL = 27, POWERED_RAIL = 27;
const DETECTOR_RAIL = 28;
const STICKY_PISTON = 29;
const COBWEB = 30, WEB = 30;
const TALLGRASS = 31, TALL_GRASS = 31;
const DEADBUSH = 32, DEAD_BUSH = 32;
const PISTON = 33;
const PISTONARMCOLLISION = 34, PISTON_ARM_COLLISION = 34;
const WOOL = 35;
public const AIR = 0;
public const STONE = 1;
public const GRASS = 2;
public const DIRT = 3;
public const COBBLESTONE = 4;
public const PLANKS = 5, WOODEN_PLANKS = 5;
public const SAPLING = 6;
public const BEDROCK = 7;
public const FLOWING_WATER = 8;
public const STILL_WATER = 9, WATER = 9;
public const FLOWING_LAVA = 10;
public const LAVA = 11, STILL_LAVA = 11;
public const SAND = 12;
public const GRAVEL = 13;
public const GOLD_ORE = 14;
public const IRON_ORE = 15;
public const COAL_ORE = 16;
public const LOG = 17, WOOD = 17;
public const LEAVES = 18;
public const SPONGE = 19;
public const GLASS = 20;
public const LAPIS_ORE = 21;
public const LAPIS_BLOCK = 22;
public const DISPENSER = 23;
public const SANDSTONE = 24;
public const NOTEBLOCK = 25, NOTE_BLOCK = 25;
public const BED_BLOCK = 26;
public const GOLDEN_RAIL = 27, POWERED_RAIL = 27;
public const DETECTOR_RAIL = 28;
public const STICKY_PISTON = 29;
public const COBWEB = 30, WEB = 30;
public const TALLGRASS = 31, TALL_GRASS = 31;
public const DEADBUSH = 32, DEAD_BUSH = 32;
public const PISTON = 33;
public const PISTONARMCOLLISION = 34, PISTON_ARM_COLLISION = 34;
public const WOOL = 35;
const DANDELION = 37, YELLOW_FLOWER = 37;
const POPPY = 38, RED_FLOWER = 38;
const BROWN_MUSHROOM = 39;
const RED_MUSHROOM = 40;
const GOLD_BLOCK = 41;
const IRON_BLOCK = 42;
const DOUBLE_STONE_SLAB = 43;
const STONE_SLAB = 44;
const BRICK_BLOCK = 45;
const TNT = 46;
const BOOKSHELF = 47;
const MOSSY_COBBLESTONE = 48, MOSS_STONE = 48;
const OBSIDIAN = 49;
const TORCH = 50;
const FIRE = 51;
const MOB_SPAWNER = 52, MONSTER_SPAWNER = 52;
const OAK_STAIRS = 53, WOODEN_STAIRS = 53;
const CHEST = 54;
const REDSTONE_WIRE = 55;
const DIAMOND_ORE = 56;
const DIAMOND_BLOCK = 57;
const CRAFTING_TABLE = 58, WORKBENCH = 58;
const WHEAT_BLOCK = 59;
const FARMLAND = 60;
const FURNACE = 61;
const BURNING_FURNACE = 62, LIT_FURNACE = 62;
const SIGN_POST = 63, STANDING_SIGN = 63;
const OAK_DOOR_BLOCK = 64, WOODEN_DOOR_BLOCK = 64;
const LADDER = 65;
const RAIL = 66;
const COBBLESTONE_STAIRS = 67, STONE_STAIRS = 67;
const WALL_SIGN = 68;
const LEVER = 69;
const STONE_PRESSURE_PLATE = 70;
const IRON_DOOR_BLOCK = 71;
const WOODEN_PRESSURE_PLATE = 72;
const REDSTONE_ORE = 73;
const GLOWING_REDSTONE_ORE = 74, LIT_REDSTONE_ORE = 74;
const UNLIT_REDSTONE_TORCH = 75;
const LIT_REDSTONE_TORCH = 76, REDSTONE_TORCH = 76;
const STONE_BUTTON = 77;
const SNOW_LAYER = 78;
const ICE = 79;
const SNOW = 80, SNOW_BLOCK = 80;
const CACTUS = 81;
const CLAY_BLOCK = 82;
const REEDS_BLOCK = 83, SUGARCANE_BLOCK = 83;
const JUKEBOX = 84;
const FENCE = 85;
const PUMPKIN = 86;
const NETHERRACK = 87;
const SOUL_SAND = 88;
const GLOWSTONE = 89;
const PORTAL = 90;
const JACK_O_LANTERN = 91, LIT_PUMPKIN = 91;
const CAKE_BLOCK = 92;
const REPEATER_BLOCK = 93, UNPOWERED_REPEATER = 93;
const POWERED_REPEATER = 94;
const INVISIBLEBEDROCK = 95, INVISIBLE_BEDROCK = 95;
const TRAPDOOR = 96, WOODEN_TRAPDOOR = 96;
const MONSTER_EGG = 97;
const STONEBRICK = 98, STONE_BRICK = 98, STONE_BRICKS = 98;
const BROWN_MUSHROOM_BLOCK = 99;
const RED_MUSHROOM_BLOCK = 100;
const IRON_BARS = 101;
const GLASS_PANE = 102;
const MELON_BLOCK = 103;
const PUMPKIN_STEM = 104;
const MELON_STEM = 105;
const VINE = 106, VINES = 106;
const FENCE_GATE = 107, OAK_FENCE_GATE = 107;
const BRICK_STAIRS = 108;
const STONE_BRICK_STAIRS = 109;
const MYCELIUM = 110;
const LILY_PAD = 111, WATERLILY = 111, WATER_LILY = 111;
const NETHER_BRICK_BLOCK = 112;
const NETHER_BRICK_FENCE = 113;
const NETHER_BRICK_STAIRS = 114;
const NETHER_WART_PLANT = 115;
const ENCHANTING_TABLE = 116, ENCHANTMENT_TABLE = 116;
const BREWING_STAND_BLOCK = 117;
const CAULDRON_BLOCK = 118;
const END_PORTAL = 119;
const END_PORTAL_FRAME = 120;
const END_STONE = 121;
const DRAGON_EGG = 122;
const REDSTONE_LAMP = 123;
const LIT_REDSTONE_LAMP = 124;
const DROPPER = 125;
const ACTIVATOR_RAIL = 126;
const COCOA = 127, COCOA_BLOCK = 127;
const SANDSTONE_STAIRS = 128;
const EMERALD_ORE = 129;
const ENDER_CHEST = 130;
const TRIPWIRE_HOOK = 131;
const TRIPWIRE = 132, TRIP_WIRE = 132;
const EMERALD_BLOCK = 133;
const SPRUCE_STAIRS = 134;
const BIRCH_STAIRS = 135;
const JUNGLE_STAIRS = 136;
const COMMAND_BLOCK = 137;
const BEACON = 138;
const COBBLESTONE_WALL = 139, STONE_WALL = 139;
const FLOWER_POT_BLOCK = 140;
const CARROTS = 141, CARROT_BLOCK = 141;
const POTATOES = 142, POTATO_BLOCK = 142;
const WOODEN_BUTTON = 143;
const MOB_HEAD_BLOCK = 144, SKULL_BLOCK = 144;
const ANVIL = 145;
const TRAPPED_CHEST = 146;
const LIGHT_WEIGHTED_PRESSURE_PLATE = 147;
const HEAVY_WEIGHTED_PRESSURE_PLATE = 148;
const COMPARATOR_BLOCK = 149, UNPOWERED_COMPARATOR = 149;
const POWERED_COMPARATOR = 150;
const DAYLIGHT_DETECTOR = 151, DAYLIGHT_SENSOR = 151;
const REDSTONE_BLOCK = 152;
const NETHER_QUARTZ_ORE = 153, QUARTZ_ORE = 153;
const HOPPER_BLOCK = 154;
const QUARTZ_BLOCK = 155;
const QUARTZ_STAIRS = 156;
const DOUBLE_WOODEN_SLAB = 157;
const WOODEN_SLAB = 158;
const STAINED_CLAY = 159, STAINED_HARDENED_CLAY = 159, TERRACOTTA = 159;
const STAINED_GLASS_PANE = 160;
const LEAVES2 = 161;
const LOG2 = 162, WOOD2 = 162;
const ACACIA_STAIRS = 163;
const DARK_OAK_STAIRS = 164;
const SLIME = 165, SLIME_BLOCK = 165;
public const DANDELION = 37, YELLOW_FLOWER = 37;
public const POPPY = 38, RED_FLOWER = 38;
public const BROWN_MUSHROOM = 39;
public const RED_MUSHROOM = 40;
public const GOLD_BLOCK = 41;
public const IRON_BLOCK = 42;
public const DOUBLE_STONE_SLAB = 43;
public const STONE_SLAB = 44;
public const BRICK_BLOCK = 45;
public const TNT = 46;
public const BOOKSHELF = 47;
public const MOSSY_COBBLESTONE = 48, MOSS_STONE = 48;
public const OBSIDIAN = 49;
public const TORCH = 50;
public const FIRE = 51;
public const MOB_SPAWNER = 52, MONSTER_SPAWNER = 52;
public const OAK_STAIRS = 53, WOODEN_STAIRS = 53;
public const CHEST = 54;
public const REDSTONE_WIRE = 55;
public const DIAMOND_ORE = 56;
public const DIAMOND_BLOCK = 57;
public const CRAFTING_TABLE = 58, WORKBENCH = 58;
public const WHEAT_BLOCK = 59;
public const FARMLAND = 60;
public const FURNACE = 61;
public const BURNING_FURNACE = 62, LIT_FURNACE = 62;
public const SIGN_POST = 63, STANDING_SIGN = 63;
public const OAK_DOOR_BLOCK = 64, WOODEN_DOOR_BLOCK = 64;
public const LADDER = 65;
public const RAIL = 66;
public const COBBLESTONE_STAIRS = 67, STONE_STAIRS = 67;
public const WALL_SIGN = 68;
public const LEVER = 69;
public const STONE_PRESSURE_PLATE = 70;
public const IRON_DOOR_BLOCK = 71;
public const WOODEN_PRESSURE_PLATE = 72;
public const REDSTONE_ORE = 73;
public const GLOWING_REDSTONE_ORE = 74, LIT_REDSTONE_ORE = 74;
public const UNLIT_REDSTONE_TORCH = 75;
public const LIT_REDSTONE_TORCH = 76, REDSTONE_TORCH = 76;
public const STONE_BUTTON = 77;
public const SNOW_LAYER = 78;
public const ICE = 79;
public const SNOW = 80, SNOW_BLOCK = 80;
public const CACTUS = 81;
public const CLAY_BLOCK = 82;
public const REEDS_BLOCK = 83, SUGARCANE_BLOCK = 83;
public const JUKEBOX = 84;
public const FENCE = 85;
public const PUMPKIN = 86;
public const NETHERRACK = 87;
public const SOUL_SAND = 88;
public const GLOWSTONE = 89;
public const PORTAL = 90;
public const JACK_O_LANTERN = 91, LIT_PUMPKIN = 91;
public const CAKE_BLOCK = 92;
public const REPEATER_BLOCK = 93, UNPOWERED_REPEATER = 93;
public const POWERED_REPEATER = 94;
public const INVISIBLEBEDROCK = 95, INVISIBLE_BEDROCK = 95;
public const TRAPDOOR = 96, WOODEN_TRAPDOOR = 96;
public const MONSTER_EGG = 97;
public const STONEBRICK = 98, STONE_BRICK = 98, STONE_BRICKS = 98;
public const BROWN_MUSHROOM_BLOCK = 99;
public const RED_MUSHROOM_BLOCK = 100;
public const IRON_BARS = 101;
public const GLASS_PANE = 102;
public const MELON_BLOCK = 103;
public const PUMPKIN_STEM = 104;
public const MELON_STEM = 105;
public const VINE = 106, VINES = 106;
public const FENCE_GATE = 107, OAK_FENCE_GATE = 107;
public const BRICK_STAIRS = 108;
public const STONE_BRICK_STAIRS = 109;
public const MYCELIUM = 110;
public const LILY_PAD = 111, WATERLILY = 111, WATER_LILY = 111;
public const NETHER_BRICK_BLOCK = 112;
public const NETHER_BRICK_FENCE = 113;
public const NETHER_BRICK_STAIRS = 114;
public const NETHER_WART_PLANT = 115;
public const ENCHANTING_TABLE = 116, ENCHANTMENT_TABLE = 116;
public const BREWING_STAND_BLOCK = 117;
public const CAULDRON_BLOCK = 118;
public const END_PORTAL = 119;
public const END_PORTAL_FRAME = 120;
public const END_STONE = 121;
public const DRAGON_EGG = 122;
public const REDSTONE_LAMP = 123;
public const LIT_REDSTONE_LAMP = 124;
public const DROPPER = 125;
public const ACTIVATOR_RAIL = 126;
public const COCOA = 127, COCOA_BLOCK = 127;
public const SANDSTONE_STAIRS = 128;
public const EMERALD_ORE = 129;
public const ENDER_CHEST = 130;
public const TRIPWIRE_HOOK = 131;
public const TRIPWIRE = 132, TRIP_WIRE = 132;
public const EMERALD_BLOCK = 133;
public const SPRUCE_STAIRS = 134;
public const BIRCH_STAIRS = 135;
public const JUNGLE_STAIRS = 136;
public const COMMAND_BLOCK = 137;
public const BEACON = 138;
public const COBBLESTONE_WALL = 139, STONE_WALL = 139;
public const FLOWER_POT_BLOCK = 140;
public const CARROTS = 141, CARROT_BLOCK = 141;
public const POTATOES = 142, POTATO_BLOCK = 142;
public const WOODEN_BUTTON = 143;
public const MOB_HEAD_BLOCK = 144, SKULL_BLOCK = 144;
public const ANVIL = 145;
public const TRAPPED_CHEST = 146;
public const LIGHT_WEIGHTED_PRESSURE_PLATE = 147;
public const HEAVY_WEIGHTED_PRESSURE_PLATE = 148;
public const COMPARATOR_BLOCK = 149, UNPOWERED_COMPARATOR = 149;
public const POWERED_COMPARATOR = 150;
public const DAYLIGHT_DETECTOR = 151, DAYLIGHT_SENSOR = 151;
public const REDSTONE_BLOCK = 152;
public const NETHER_QUARTZ_ORE = 153, QUARTZ_ORE = 153;
public const HOPPER_BLOCK = 154;
public const QUARTZ_BLOCK = 155;
public const QUARTZ_STAIRS = 156;
public const DOUBLE_WOODEN_SLAB = 157;
public const WOODEN_SLAB = 158;
public const STAINED_CLAY = 159, STAINED_HARDENED_CLAY = 159, TERRACOTTA = 159;
public const STAINED_GLASS_PANE = 160;
public const LEAVES2 = 161;
public const LOG2 = 162, WOOD2 = 162;
public const ACACIA_STAIRS = 163;
public const DARK_OAK_STAIRS = 164;
public const SLIME = 165, SLIME_BLOCK = 165;
const IRON_TRAPDOOR = 167;
const PRISMARINE = 168;
const SEALANTERN = 169, SEA_LANTERN = 169;
const HAY_BALE = 170, HAY_BLOCK = 170;
const CARPET = 171;
const HARDENED_CLAY = 172;
const COAL_BLOCK = 173;
const PACKED_ICE = 174;
const DOUBLE_PLANT = 175;
const STANDING_BANNER = 176;
const WALL_BANNER = 177;
const DAYLIGHT_DETECTOR_INVERTED = 178, DAYLIGHT_SENSOR_INVERTED = 178;
const RED_SANDSTONE = 179;
const RED_SANDSTONE_STAIRS = 180;
const DOUBLE_STONE_SLAB2 = 181;
const STONE_SLAB2 = 182;
const SPRUCE_FENCE_GATE = 183;
const BIRCH_FENCE_GATE = 184;
const JUNGLE_FENCE_GATE = 185;
const DARK_OAK_FENCE_GATE = 186;
const ACACIA_FENCE_GATE = 187;
const REPEATING_COMMAND_BLOCK = 188;
const CHAIN_COMMAND_BLOCK = 189;
public const IRON_TRAPDOOR = 167;
public const PRISMARINE = 168;
public const SEALANTERN = 169, SEA_LANTERN = 169;
public const HAY_BALE = 170, HAY_BLOCK = 170;
public const CARPET = 171;
public const HARDENED_CLAY = 172;
public const COAL_BLOCK = 173;
public const PACKED_ICE = 174;
public const DOUBLE_PLANT = 175;
public const STANDING_BANNER = 176;
public const WALL_BANNER = 177;
public const DAYLIGHT_DETECTOR_INVERTED = 178, DAYLIGHT_SENSOR_INVERTED = 178;
public const RED_SANDSTONE = 179;
public const RED_SANDSTONE_STAIRS = 180;
public const DOUBLE_STONE_SLAB2 = 181;
public const STONE_SLAB2 = 182;
public const SPRUCE_FENCE_GATE = 183;
public const BIRCH_FENCE_GATE = 184;
public const JUNGLE_FENCE_GATE = 185;
public const DARK_OAK_FENCE_GATE = 186;
public const ACACIA_FENCE_GATE = 187;
public const REPEATING_COMMAND_BLOCK = 188;
public const CHAIN_COMMAND_BLOCK = 189;
const SPRUCE_DOOR_BLOCK = 193;
const BIRCH_DOOR_BLOCK = 194;
const JUNGLE_DOOR_BLOCK = 195;
const ACACIA_DOOR_BLOCK = 196;
const DARK_OAK_DOOR_BLOCK = 197;
const GRASS_PATH = 198;
const FRAME_BLOCK = 199, ITEM_FRAME_BLOCK = 199;
const CHORUS_FLOWER = 200;
const PURPUR_BLOCK = 201;
public const SPRUCE_DOOR_BLOCK = 193;
public const BIRCH_DOOR_BLOCK = 194;
public const JUNGLE_DOOR_BLOCK = 195;
public const ACACIA_DOOR_BLOCK = 196;
public const DARK_OAK_DOOR_BLOCK = 197;
public const GRASS_PATH = 198;
public const FRAME_BLOCK = 199, ITEM_FRAME_BLOCK = 199;
public const CHORUS_FLOWER = 200;
public const PURPUR_BLOCK = 201;
const PURPUR_STAIRS = 203;
public const PURPUR_STAIRS = 203;
const UNDYED_SHULKER_BOX = 205;
const END_BRICKS = 206;
const FROSTED_ICE = 207;
const END_ROD = 208;
const END_GATEWAY = 209;
public const UNDYED_SHULKER_BOX = 205;
public const END_BRICKS = 206;
public const FROSTED_ICE = 207;
public const END_ROD = 208;
public const END_GATEWAY = 209;
const MAGMA = 213;
const NETHER_WART_BLOCK = 214;
const RED_NETHER_BRICK = 215;
const BONE_BLOCK = 216;
public const MAGMA = 213;
public const NETHER_WART_BLOCK = 214;
public const RED_NETHER_BRICK = 215;
public const BONE_BLOCK = 216;
const SHULKER_BOX = 218;
const PURPLE_GLAZED_TERRACOTTA = 219;
const WHITE_GLAZED_TERRACOTTA = 220;
const ORANGE_GLAZED_TERRACOTTA = 221;
const MAGENTA_GLAZED_TERRACOTTA = 222;
const LIGHT_BLUE_GLAZED_TERRACOTTA = 223;
const YELLOW_GLAZED_TERRACOTTA = 224;
const LIME_GLAZED_TERRACOTTA = 225;
const PINK_GLAZED_TERRACOTTA = 226;
const GRAY_GLAZED_TERRACOTTA = 227;
const SILVER_GLAZED_TERRACOTTA = 228;
const CYAN_GLAZED_TERRACOTTA = 229;
public const SHULKER_BOX = 218;
public const PURPLE_GLAZED_TERRACOTTA = 219;
public const WHITE_GLAZED_TERRACOTTA = 220;
public const ORANGE_GLAZED_TERRACOTTA = 221;
public const MAGENTA_GLAZED_TERRACOTTA = 222;
public const LIGHT_BLUE_GLAZED_TERRACOTTA = 223;
public const YELLOW_GLAZED_TERRACOTTA = 224;
public const LIME_GLAZED_TERRACOTTA = 225;
public const PINK_GLAZED_TERRACOTTA = 226;
public const GRAY_GLAZED_TERRACOTTA = 227;
public const SILVER_GLAZED_TERRACOTTA = 228;
public const CYAN_GLAZED_TERRACOTTA = 229;
const BLUE_GLAZED_TERRACOTTA = 231;
const BROWN_GLAZED_TERRACOTTA = 232;
const GREEN_GLAZED_TERRACOTTA = 233;
const RED_GLAZED_TERRACOTTA = 234;
const BLACK_GLAZED_TERRACOTTA = 235;
const CONCRETE = 236;
const CONCRETEPOWDER = 237, CONCRETE_POWDER = 237;
public const BLUE_GLAZED_TERRACOTTA = 231;
public const BROWN_GLAZED_TERRACOTTA = 232;
public const GREEN_GLAZED_TERRACOTTA = 233;
public const RED_GLAZED_TERRACOTTA = 234;
public const BLACK_GLAZED_TERRACOTTA = 235;
public const CONCRETE = 236;
public const CONCRETEPOWDER = 237, CONCRETE_POWDER = 237;
const CHORUS_PLANT = 240;
const STAINED_GLASS = 241;
public const CHORUS_PLANT = 240;
public const STAINED_GLASS = 241;
const PODZOL = 243;
const BEETROOT_BLOCK = 244;
const STONECUTTER = 245;
const GLOWINGOBSIDIAN = 246, GLOWING_OBSIDIAN = 246;
const NETHERREACTOR = 247, NETHER_REACTOR = 247;
const INFO_UPDATE = 248;
const INFO_UPDATE2 = 249;
const MOVINGBLOCK = 250, MOVING_BLOCK = 250;
const OBSERVER = 251;
const STRUCTURE_BLOCK = 252;
public const PODZOL = 243;
public const BEETROOT_BLOCK = 244;
public const STONECUTTER = 245;
public const GLOWINGOBSIDIAN = 246, GLOWING_OBSIDIAN = 246;
public const NETHERREACTOR = 247, NETHER_REACTOR = 247;
public const INFO_UPDATE = 248;
public const INFO_UPDATE2 = 249;
public const MOVINGBLOCK = 250, MOVING_BLOCK = 250;
public const OBSERVER = 251;
public const STRUCTURE_BLOCK = 252;
const RESERVED6 = 255;
public const RESERVED6 = 255;
}

View File

@ -28,8 +28,8 @@ use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Vector3;
class CobblestoneWall extends Transparent{
const NONE_MOSSY_WALL = 0;
const MOSSY_WALL = 1;
public const NONE_MOSSY_WALL = 0;
public const MOSSY_WALL = 1;
protected $id = self::COBBLESTONE_WALL;

View File

@ -30,7 +30,7 @@ use pocketmine\math\Vector3;
use pocketmine\Player;
class DoublePlant extends Flowable{
const BITFLAG_TOP = 0x08;
public const BITFLAG_TOP = 0x08;
protected $id = self::DOUBLE_PLANT;

View File

@ -29,15 +29,15 @@ use pocketmine\math\Vector3;
use pocketmine\Player;
class Flower extends Flowable{
const TYPE_POPPY = 0;
const TYPE_BLUE_ORCHID = 1;
const TYPE_ALLIUM = 2;
const TYPE_AZURE_BLUET = 3;
const TYPE_RED_TULIP = 4;
const TYPE_ORANGE_TULIP = 5;
const TYPE_WHITE_TULIP = 6;
const TYPE_PINK_TULIP = 7;
const TYPE_OXEYE_DAISY = 8;
public const TYPE_POPPY = 0;
public const TYPE_BLUE_ORCHID = 1;
public const TYPE_ALLIUM = 2;
public const TYPE_AZURE_BLUET = 3;
public const TYPE_RED_TULIP = 4;
public const TYPE_ORANGE_TULIP = 5;
public const TYPE_WHITE_TULIP = 6;
public const TYPE_PINK_TULIP = 7;
public const TYPE_OXEYE_DAISY = 8;
protected $id = self::RED_FLOWER;

View File

@ -33,8 +33,8 @@ use pocketmine\tile\Tile;
class FlowerPot extends Flowable{
const STATE_EMPTY = 0;
const STATE_FULL = 1;
public const STATE_EMPTY = 0;
public const STATE_FULL = 1;
protected $id = self::FLOWER_POT_BLOCK;
protected $itemId = Item::FLOWER_POT;

View File

@ -32,12 +32,12 @@ use pocketmine\math\Vector3;
use pocketmine\Player;
class Leaves extends Transparent{
const OAK = 0;
const SPRUCE = 1;
const BIRCH = 2;
const JUNGLE = 3;
const ACACIA = 0;
const DARK_OAK = 1;
public const OAK = 0;
public const SPRUCE = 1;
public const BIRCH = 2;
public const JUNGLE = 3;
public const ACACIA = 0;
public const DARK_OAK = 1;
protected $id = self::LEAVES;
protected $woodType = self::WOOD;

View File

@ -26,12 +26,12 @@ namespace pocketmine\block;
use pocketmine\item\Tool;
class Planks extends Solid{
const OAK = 0;
const SPRUCE = 1;
const BIRCH = 2;
const JUNGLE = 3;
const ACACIA = 4;
const DARK_OAK = 5;
public const OAK = 0;
public const SPRUCE = 1;
public const BIRCH = 2;
public const JUNGLE = 3;
public const ACACIA = 4;
public const DARK_OAK = 5;
protected $id = self::WOODEN_PLANKS;

View File

@ -28,9 +28,9 @@ use pocketmine\item\Tool;
class Prismarine extends Solid{
const NORMAL = 0;
const DARK = 1;
const BRICKS = 2;
public const NORMAL = 0;
public const DARK = 1;
public const BRICKS = 2;
protected $id = self::PRISMARINE;

View File

@ -31,9 +31,9 @@ use pocketmine\Player;
class Quartz extends Solid{
const NORMAL = 0;
const CHISELED = 1;
const PILLAR = 2;
public const NORMAL = 0;
public const CHISELED = 1;
public const PILLAR = 2;
protected $id = self::QUARTZ_BLOCK;

View File

@ -30,16 +30,16 @@ use pocketmine\Player;
class Rail extends Flowable{
const STRAIGHT_NORTH_SOUTH = 0;
const STRAIGHT_EAST_WEST = 1;
const ASCENDING_EAST = 2;
const ASCENDING_WEST = 3;
const ASCENDING_NORTH = 4;
const ASCENDING_SOUTH = 5;
const CURVE_SOUTHEAST = 6;
const CURVE_SOUTHWEST = 7;
const CURVE_NORTHWEST = 8;
const CURVE_NORTHEAST = 9;
public const STRAIGHT_NORTH_SOUTH = 0;
public const STRAIGHT_EAST_WEST = 1;
public const ASCENDING_EAST = 2;
public const ASCENDING_WEST = 3;
public const ASCENDING_NORTH = 4;
public const ASCENDING_SOUTH = 5;
public const CURVE_SOUTHEAST = 6;
public const CURVE_SOUTHWEST = 7;
public const CURVE_NORTHWEST = 8;
public const CURVE_NORTHEAST = 9;
protected $id = self::RAIL;

View File

@ -28,9 +28,9 @@ use pocketmine\item\Tool;
class Sandstone extends Solid{
const NORMAL = 0;
const CHISELED = 1;
const SMOOTH = 2;
public const NORMAL = 0;
public const CHISELED = 1;
public const SMOOTH = 2;
protected $id = self::SANDSTONE;

View File

@ -31,12 +31,12 @@ use pocketmine\Player;
use pocketmine\utils\Random;
class Sapling extends Flowable{
const OAK = 0;
const SPRUCE = 1;
const BIRCH = 2;
const JUNGLE = 3;
const ACACIA = 4;
const DARK_OAK = 5;
public const OAK = 0;
public const SPRUCE = 1;
public const BIRCH = 2;
public const JUNGLE = 3;
public const ACACIA = 4;
public const DARK_OAK = 5;
protected $id = self::SAPLING;

View File

@ -28,13 +28,13 @@ use pocketmine\item\ItemFactory;
use pocketmine\item\Tool;
class Stone extends Solid{
const NORMAL = 0;
const GRANITE = 1;
const POLISHED_GRANITE = 2;
const DIORITE = 3;
const POLISHED_DIORITE = 4;
const ANDESITE = 5;
const POLISHED_ANDESITE = 6;
public const NORMAL = 0;
public const GRANITE = 1;
public const POLISHED_GRANITE = 2;
public const DIORITE = 3;
public const POLISHED_DIORITE = 4;
public const ANDESITE = 5;
public const POLISHED_ANDESITE = 6;
protected $id = self::STONE;

View File

@ -27,10 +27,10 @@ use pocketmine\item\Item;
use pocketmine\item\Tool;
class StoneBricks extends Solid{
const NORMAL = 0;
const MOSSY = 1;
const CRACKED = 2;
const CHISELED = 3;
public const NORMAL = 0;
public const MOSSY = 1;
public const CRACKED = 2;
public const CHISELED = 3;
protected $id = self::STONE_BRICKS;

View File

@ -27,14 +27,14 @@ use pocketmine\item\Item;
use pocketmine\item\Tool;
class StoneSlab extends Slab{
const STONE = 0;
const SANDSTONE = 1;
const WOODEN = 2;
const COBBLESTONE = 3;
const BRICK = 4;
const STONE_BRICK = 5;
const QUARTZ = 6;
const NETHER_BRICK = 7;
public const STONE = 0;
public const SANDSTONE = 1;
public const WOODEN = 2;
public const COBBLESTONE = 3;
public const BRICK = 4;
public const STONE_BRICK = 5;
public const QUARTZ = 6;
public const NETHER_BRICK = 7;
protected $id = self::STONE_SLAB;

View File

@ -24,8 +24,8 @@ declare(strict_types=1);
namespace pocketmine\block;
class StoneSlab2 extends StoneSlab{
const TYPE_RED_SANDSTONE = 0;
const TYPE_PURPUR = 1;
public const TYPE_RED_SANDSTONE = 0;
public const TYPE_PURPUR = 1;
protected $id = self::STONE_SLAB2;

View File

@ -31,13 +31,13 @@ use pocketmine\math\Vector3;
use pocketmine\Player;
class Trapdoor extends Transparent{
const MASK_UPPER = 0x04;
const MASK_OPENED = 0x08;
const MASK_SIDE = 0x03;
const MASK_SIDE_SOUTH = 2;
const MASK_SIDE_NORTH = 3;
const MASK_SIDE_EAST = 0;
const MASK_SIDE_WEST = 1;
public const MASK_UPPER = 0x04;
public const MASK_OPENED = 0x08;
public const MASK_SIDE = 0x03;
public const MASK_SIDE_SOUTH = 2;
public const MASK_SIDE_NORTH = 3;
public const MASK_SIDE_EAST = 0;
public const MASK_SIDE_WEST = 1;
protected $id = self::TRAPDOOR;

View File

@ -32,10 +32,10 @@ use pocketmine\math\Vector3;
use pocketmine\Player;
class Vine extends Flowable{
const FLAG_SOUTH = 0x01;
const FLAG_WEST = 0x02;
const FLAG_NORTH = 0x04;
const FLAG_EAST = 0x08;
public const FLAG_SOUTH = 0x01;
public const FLAG_WEST = 0x02;
public const FLAG_NORTH = 0x04;
public const FLAG_EAST = 0x08;
protected $id = self::VINE;

View File

@ -30,10 +30,10 @@ use pocketmine\math\Vector3;
use pocketmine\Player;
class Wood extends Solid{
const OAK = 0;
const SPRUCE = 1;
const BIRCH = 2;
const JUNGLE = 3;
public const OAK = 0;
public const SPRUCE = 1;
public const BIRCH = 2;
public const JUNGLE = 3;
protected $id = self::WOOD;

View File

@ -26,8 +26,8 @@ namespace pocketmine\block;
class Wood2 extends Wood{
const ACACIA = 0;
const DARK_OAK = 1;
public const ACACIA = 0;
public const DARK_OAK = 1;
protected $id = self::WOOD2;

View File

@ -26,12 +26,12 @@ namespace pocketmine\block;
use pocketmine\item\Tool;
class WoodenFence extends Fence{
const FENCE_OAK = 0;
const FENCE_SPRUCE = 1;
const FENCE_BIRCH = 2;
const FENCE_JUNGLE = 3;
const FENCE_ACACIA = 4;
const FENCE_DARKOAK = 5;
public const FENCE_OAK = 0;
public const FENCE_SPRUCE = 1;
public const FENCE_BIRCH = 2;
public const FENCE_JUNGLE = 3;
public const FENCE_ACACIA = 4;
public const FENCE_DARKOAK = 5;
protected $id = self::FENCE;

View File

@ -27,9 +27,9 @@ use pocketmine\Thread;
class CommandReader extends Thread{
const TYPE_READLINE = 0;
const TYPE_STREAM = 1;
const TYPE_PIPED = 2;
public const TYPE_READLINE = 0;
public const TYPE_STREAM = 1;
public const TYPE_PIPED = 2;
/** @var \Threaded */
protected $buffer;

View File

@ -27,8 +27,8 @@ use pocketmine\command\Command;
use pocketmine\command\CommandSender;
abstract class VanillaCommand extends Command{
const MAX_COORD = 30000000;
const MIN_COORD = -30000000;
public const MAX_COORD = 30000000;
public const MIN_COORD = -30000000;
/**
* @param CommandSender $sender

View File

@ -25,18 +25,18 @@ namespace pocketmine\entity;
class Attribute{
const ABSORPTION = 0;
const SATURATION = 1;
const EXHAUSTION = 2;
const KNOCKBACK_RESISTANCE = 3;
const HEALTH = 4;
const MOVEMENT_SPEED = 5;
const FOLLOW_RANGE = 6;
const HUNGER = 7;
const FOOD = 7;
const ATTACK_DAMAGE = 8;
const EXPERIENCE_LEVEL = 9;
const EXPERIENCE = 10;
public const ABSORPTION = 0;
public const SATURATION = 1;
public const EXHAUSTION = 2;
public const KNOCKBACK_RESISTANCE = 3;
public const HEALTH = 4;
public const MOVEMENT_SPEED = 5;
public const FOLLOW_RANGE = 6;
public const HUNGER = 7;
public const FOOD = 7;
public const ATTACK_DAMAGE = 8;
public const EXPERIENCE_LEVEL = 9;
public const EXPERIENCE = 10;
private $id;
protected $minValue;

View File

@ -33,30 +33,30 @@ use pocketmine\Player;
use pocketmine\utils\Config;
class Effect{
const SPEED = 1;
const SLOWNESS = 2;
const HASTE = 3;
const FATIGUE = 4, MINING_FATIGUE = 4;
const STRENGTH = 5;
const INSTANT_HEALTH = 6, HEALING = 6;
const INSTANT_DAMAGE = 7, HARMING = 7;
const JUMP = 8;
const NAUSEA = 9, CONFUSION = 9;
const REGENERATION = 10;
const DAMAGE_RESISTANCE = 11;
const FIRE_RESISTANCE = 12;
const WATER_BREATHING = 13;
const INVISIBILITY = 14;
const BLINDNESS = 15;
const NIGHT_VISION = 16;
const HUNGER = 17;
const WEAKNESS = 18;
const POISON = 19;
const WITHER = 20;
const HEALTH_BOOST = 21;
const ABSORPTION = 22;
const SATURATION = 23;
const LEVITATION = 24; //TODO
public const SPEED = 1;
public const SLOWNESS = 2;
public const HASTE = 3;
public const FATIGUE = 4, MINING_FATIGUE = 4;
public const STRENGTH = 5;
public const INSTANT_HEALTH = 6, HEALING = 6;
public const INSTANT_DAMAGE = 7, HARMING = 7;
public const JUMP = 8;
public const NAUSEA = 9, CONFUSION = 9;
public const REGENERATION = 10;
public const DAMAGE_RESISTANCE = 11;
public const FIRE_RESISTANCE = 12;
public const WATER_BREATHING = 13;
public const INVISIBILITY = 14;
public const BLINDNESS = 15;
public const NIGHT_VISION = 16;
public const HUNGER = 17;
public const WEAKNESS = 18;
public const POISON = 19;
public const WITHER = 20;
public const HEALTH_BOOST = 21;
public const ABSORPTION = 22;
public const SATURATION = 23;
public const LEVITATION = 24; //TODO
/** @var Effect[] */
protected static $effects = [];

View File

@ -68,149 +68,149 @@ use pocketmine\Server;
abstract class Entity extends Location implements Metadatable, EntityIds{
const MOTION_THRESHOLD = 0.00001;
public const MOTION_THRESHOLD = 0.00001;
const NETWORK_ID = -1;
public const NETWORK_ID = -1;
const DATA_TYPE_BYTE = 0;
const DATA_TYPE_SHORT = 1;
const DATA_TYPE_INT = 2;
const DATA_TYPE_FLOAT = 3;
const DATA_TYPE_STRING = 4;
const DATA_TYPE_SLOT = 5;
const DATA_TYPE_POS = 6;
const DATA_TYPE_LONG = 7;
const DATA_TYPE_VECTOR3F = 8;
public const DATA_TYPE_BYTE = 0;
public const DATA_TYPE_SHORT = 1;
public const DATA_TYPE_INT = 2;
public const DATA_TYPE_FLOAT = 3;
public const DATA_TYPE_STRING = 4;
public const DATA_TYPE_SLOT = 5;
public const DATA_TYPE_POS = 6;
public const DATA_TYPE_LONG = 7;
public const DATA_TYPE_VECTOR3F = 8;
const DATA_FLAGS = 0;
const DATA_HEALTH = 1; //int (minecart/boat)
const DATA_VARIANT = 2; //int
const DATA_COLOR = 3, DATA_COLOUR = 3; //byte
const DATA_NAMETAG = 4; //string
const DATA_OWNER_EID = 5; //long
const DATA_TARGET_EID = 6; //long
const DATA_AIR = 7; //short
const DATA_POTION_COLOR = 8; //int (ARGB!)
const DATA_POTION_AMBIENT = 9; //byte
public const DATA_FLAGS = 0;
public const DATA_HEALTH = 1; //int (minecart/boat)
public const DATA_VARIANT = 2; //int
public const DATA_COLOR = 3, DATA_COLOUR = 3; //byte
public const DATA_NAMETAG = 4; //string
public const DATA_OWNER_EID = 5; //long
public const DATA_TARGET_EID = 6; //long
public const DATA_AIR = 7; //short
public const DATA_POTION_COLOR = 8; //int (ARGB!)
public const DATA_POTION_AMBIENT = 9; //byte
/* 10 (byte) */
const DATA_HURT_TIME = 11; //int (minecart/boat)
const DATA_HURT_DIRECTION = 12; //int (minecart/boat)
const DATA_PADDLE_TIME_LEFT = 13; //float
const DATA_PADDLE_TIME_RIGHT = 14; //float
const DATA_EXPERIENCE_VALUE = 15; //int (xp orb)
const DATA_MINECART_DISPLAY_BLOCK = 16; //int (id | (data << 16))
const DATA_MINECART_DISPLAY_OFFSET = 17; //int
const DATA_MINECART_HAS_DISPLAY = 18; //byte (must be 1 for minecart to show block inside)
public const DATA_HURT_TIME = 11; //int (minecart/boat)
public const DATA_HURT_DIRECTION = 12; //int (minecart/boat)
public const DATA_PADDLE_TIME_LEFT = 13; //float
public const DATA_PADDLE_TIME_RIGHT = 14; //float
public const DATA_EXPERIENCE_VALUE = 15; //int (xp orb)
public const DATA_MINECART_DISPLAY_BLOCK = 16; //int (id | (data << 16))
public const DATA_MINECART_DISPLAY_OFFSET = 17; //int
public const DATA_MINECART_HAS_DISPLAY = 18; //byte (must be 1 for minecart to show block inside)
//TODO: add more properties
const DATA_ENDERMAN_HELD_ITEM_ID = 23; //short
const DATA_ENDERMAN_HELD_ITEM_DAMAGE = 24; //short
const DATA_ENTITY_AGE = 25; //short
public const DATA_ENDERMAN_HELD_ITEM_ID = 23; //short
public const DATA_ENDERMAN_HELD_ITEM_DAMAGE = 24; //short
public const DATA_ENTITY_AGE = 25; //short
/* 27 (byte) player-specific flags
* 28 (int) player "index"?
* 29 (block coords) bed position */
const DATA_FIREBALL_POWER_X = 30; //float
const DATA_FIREBALL_POWER_Y = 31;
const DATA_FIREBALL_POWER_Z = 32;
public const DATA_FIREBALL_POWER_X = 30; //float
public const DATA_FIREBALL_POWER_Y = 31;
public const DATA_FIREBALL_POWER_Z = 32;
/* 33 (unknown)
* 34 (float) fishing bobber
* 35 (float) fishing bobber
* 36 (float) fishing bobber */
const DATA_POTION_AUX_VALUE = 37; //short
const DATA_LEAD_HOLDER_EID = 38; //long
const DATA_SCALE = 39; //float
const DATA_INTERACTIVE_TAG = 40; //string (button text)
const DATA_NPC_SKIN_ID = 41; //string
const DATA_URL_TAG = 42; //string
const DATA_MAX_AIR = 43; //short
const DATA_MARK_VARIANT = 44; //int
public const DATA_POTION_AUX_VALUE = 37; //short
public const DATA_LEAD_HOLDER_EID = 38; //long
public const DATA_SCALE = 39; //float
public const DATA_INTERACTIVE_TAG = 40; //string (button text)
public const DATA_NPC_SKIN_ID = 41; //string
public const DATA_URL_TAG = 42; //string
public const DATA_MAX_AIR = 43; //short
public const DATA_MARK_VARIANT = 44; //int
/* 45 (byte) container stuff
* 46 (int) container stuff
* 47 (int) container stuff */
const DATA_BLOCK_TARGET = 48; //block coords (ender crystal)
const DATA_WITHER_INVULNERABLE_TICKS = 49; //int
const DATA_WITHER_TARGET_1 = 50; //long
const DATA_WITHER_TARGET_2 = 51; //long
const DATA_WITHER_TARGET_3 = 52; //long
public const DATA_BLOCK_TARGET = 48; //block coords (ender crystal)
public const DATA_WITHER_INVULNERABLE_TICKS = 49; //int
public const DATA_WITHER_TARGET_1 = 50; //long
public const DATA_WITHER_TARGET_2 = 51; //long
public const DATA_WITHER_TARGET_3 = 52; //long
/* 53 (short) */
const DATA_BOUNDING_BOX_WIDTH = 54; //float
const DATA_BOUNDING_BOX_HEIGHT = 55; //float
const DATA_FUSE_LENGTH = 56; //int
const DATA_RIDER_SEAT_POSITION = 57; //vector3f
const DATA_RIDER_ROTATION_LOCKED = 58; //byte
const DATA_RIDER_MAX_ROTATION = 59; //float
const DATA_RIDER_MIN_ROTATION = 60; //float
const DATA_AREA_EFFECT_CLOUD_RADIUS = 61; //float
const DATA_AREA_EFFECT_CLOUD_WAITING = 62; //int
const DATA_AREA_EFFECT_CLOUD_PARTICLE_ID = 63; //int
public const DATA_BOUNDING_BOX_WIDTH = 54; //float
public const DATA_BOUNDING_BOX_HEIGHT = 55; //float
public const DATA_FUSE_LENGTH = 56; //int
public const DATA_RIDER_SEAT_POSITION = 57; //vector3f
public const DATA_RIDER_ROTATION_LOCKED = 58; //byte
public const DATA_RIDER_MAX_ROTATION = 59; //float
public const DATA_RIDER_MIN_ROTATION = 60; //float
public const DATA_AREA_EFFECT_CLOUD_RADIUS = 61; //float
public const DATA_AREA_EFFECT_CLOUD_WAITING = 62; //int
public const DATA_AREA_EFFECT_CLOUD_PARTICLE_ID = 63; //int
/* 64 (int) shulker-related */
const DATA_SHULKER_ATTACH_FACE = 65; //byte
public const DATA_SHULKER_ATTACH_FACE = 65; //byte
/* 66 (short) shulker-related */
const DATA_SHULKER_ATTACH_POS = 67; //block coords
const DATA_TRADING_PLAYER_EID = 68; //long
public const DATA_SHULKER_ATTACH_POS = 67; //block coords
public const DATA_TRADING_PLAYER_EID = 68; //long
/* 70 (byte) command-block */
const DATA_COMMAND_BLOCK_COMMAND = 71; //string
const DATA_COMMAND_BLOCK_LAST_OUTPUT = 72; //string
const DATA_COMMAND_BLOCK_TRACK_OUTPUT = 73; //byte
const DATA_CONTROLLING_RIDER_SEAT_NUMBER = 74; //byte
const DATA_STRENGTH = 75; //int
const DATA_MAX_STRENGTH = 76; //int
public const DATA_COMMAND_BLOCK_COMMAND = 71; //string
public const DATA_COMMAND_BLOCK_LAST_OUTPUT = 72; //string
public const DATA_COMMAND_BLOCK_TRACK_OUTPUT = 73; //byte
public const DATA_CONTROLLING_RIDER_SEAT_NUMBER = 74; //byte
public const DATA_STRENGTH = 75; //int
public const DATA_MAX_STRENGTH = 76; //int
/* 77 (int)
* 78 (int) */
const DATA_FLAG_ONFIRE = 0;
const DATA_FLAG_SNEAKING = 1;
const DATA_FLAG_RIDING = 2;
const DATA_FLAG_SPRINTING = 3;
const DATA_FLAG_ACTION = 4;
const DATA_FLAG_INVISIBLE = 5;
const DATA_FLAG_TEMPTED = 6;
const DATA_FLAG_INLOVE = 7;
const DATA_FLAG_SADDLED = 8;
const DATA_FLAG_POWERED = 9;
const DATA_FLAG_IGNITED = 10;
const DATA_FLAG_BABY = 11;
const DATA_FLAG_CONVERTING = 12;
const DATA_FLAG_CRITICAL = 13;
const DATA_FLAG_CAN_SHOW_NAMETAG = 14;
const DATA_FLAG_ALWAYS_SHOW_NAMETAG = 15;
const DATA_FLAG_IMMOBILE = 16, DATA_FLAG_NO_AI = 16;
const DATA_FLAG_SILENT = 17;
const DATA_FLAG_WALLCLIMBING = 18;
const DATA_FLAG_CAN_CLIMB = 19;
const DATA_FLAG_SWIMMER = 20;
const DATA_FLAG_CAN_FLY = 21;
const DATA_FLAG_RESTING = 22;
const DATA_FLAG_SITTING = 23;
const DATA_FLAG_ANGRY = 24;
const DATA_FLAG_INTERESTED = 25;
const DATA_FLAG_CHARGED = 26;
const DATA_FLAG_TAMED = 27;
const DATA_FLAG_LEASHED = 28;
const DATA_FLAG_SHEARED = 29;
const DATA_FLAG_GLIDING = 30;
const DATA_FLAG_ELDER = 31;
const DATA_FLAG_MOVING = 32;
const DATA_FLAG_BREATHING = 33;
const DATA_FLAG_CHESTED = 34;
const DATA_FLAG_STACKABLE = 35;
const DATA_FLAG_SHOWBASE = 36;
const DATA_FLAG_REARING = 37;
const DATA_FLAG_VIBRATING = 38;
const DATA_FLAG_IDLING = 39;
const DATA_FLAG_EVOKER_SPELL = 40;
const DATA_FLAG_CHARGE_ATTACK = 41;
const DATA_FLAG_WASD_CONTROLLED = 42;
const DATA_FLAG_CAN_POWER_JUMP = 43;
const DATA_FLAG_LINGER = 44;
const DATA_FLAG_HAS_COLLISION = 45;
const DATA_FLAG_AFFECTED_BY_GRAVITY = 46;
const DATA_FLAG_FIRE_IMMUNE = 47;
const DATA_FLAG_DANCING = 48;
public const DATA_FLAG_ONFIRE = 0;
public const DATA_FLAG_SNEAKING = 1;
public const DATA_FLAG_RIDING = 2;
public const DATA_FLAG_SPRINTING = 3;
public const DATA_FLAG_ACTION = 4;
public const DATA_FLAG_INVISIBLE = 5;
public const DATA_FLAG_TEMPTED = 6;
public const DATA_FLAG_INLOVE = 7;
public const DATA_FLAG_SADDLED = 8;
public const DATA_FLAG_POWERED = 9;
public const DATA_FLAG_IGNITED = 10;
public const DATA_FLAG_BABY = 11;
public const DATA_FLAG_CONVERTING = 12;
public const DATA_FLAG_CRITICAL = 13;
public const DATA_FLAG_CAN_SHOW_NAMETAG = 14;
public const DATA_FLAG_ALWAYS_SHOW_NAMETAG = 15;
public const DATA_FLAG_IMMOBILE = 16, DATA_FLAG_NO_AI = 16;
public const DATA_FLAG_SILENT = 17;
public const DATA_FLAG_WALLCLIMBING = 18;
public const DATA_FLAG_CAN_CLIMB = 19;
public const DATA_FLAG_SWIMMER = 20;
public const DATA_FLAG_CAN_FLY = 21;
public const DATA_FLAG_RESTING = 22;
public const DATA_FLAG_SITTING = 23;
public const DATA_FLAG_ANGRY = 24;
public const DATA_FLAG_INTERESTED = 25;
public const DATA_FLAG_CHARGED = 26;
public const DATA_FLAG_TAMED = 27;
public const DATA_FLAG_LEASHED = 28;
public const DATA_FLAG_SHEARED = 29;
public const DATA_FLAG_GLIDING = 30;
public const DATA_FLAG_ELDER = 31;
public const DATA_FLAG_MOVING = 32;
public const DATA_FLAG_BREATHING = 33;
public const DATA_FLAG_CHESTED = 34;
public const DATA_FLAG_STACKABLE = 35;
public const DATA_FLAG_SHOWBASE = 36;
public const DATA_FLAG_REARING = 37;
public const DATA_FLAG_VIBRATING = 38;
public const DATA_FLAG_IDLING = 39;
public const DATA_FLAG_EVOKER_SPELL = 40;
public const DATA_FLAG_CHARGE_ATTACK = 41;
public const DATA_FLAG_WASD_CONTROLLED = 42;
public const DATA_FLAG_CAN_POWER_JUMP = 43;
public const DATA_FLAG_LINGER = 44;
public const DATA_FLAG_HAS_COLLISION = 45;
public const DATA_FLAG_AFFECTED_BY_GRAVITY = 46;
public const DATA_FLAG_FIRE_IMMUNE = 47;
public const DATA_FLAG_DANCING = 48;
public static $entityCount = 1;
/** @var Entity[] */

View File

@ -25,95 +25,95 @@ namespace pocketmine\entity;
interface EntityIds{
const CHICKEN = 10;
const COW = 11;
const PIG = 12;
const SHEEP = 13;
const WOLF = 14;
const VILLAGER = 15;
const MOOSHROOM = 16;
const SQUID = 17;
const RABBIT = 18;
const BAT = 19;
const IRON_GOLEM = 20;
const SNOW_GOLEM = 21;
const OCELOT = 22;
const HORSE = 23;
const DONKEY = 24;
const MULE = 25;
const SKELETON_HORSE = 26;
const ZOMBIE_HORSE = 27;
const POLAR_BEAR = 28;
const LLAMA = 29;
const PARROT = 30;
public const CHICKEN = 10;
public const COW = 11;
public const PIG = 12;
public const SHEEP = 13;
public const WOLF = 14;
public const VILLAGER = 15;
public const MOOSHROOM = 16;
public const SQUID = 17;
public const RABBIT = 18;
public const BAT = 19;
public const IRON_GOLEM = 20;
public const SNOW_GOLEM = 21;
public const OCELOT = 22;
public const HORSE = 23;
public const DONKEY = 24;
public const MULE = 25;
public const SKELETON_HORSE = 26;
public const ZOMBIE_HORSE = 27;
public const POLAR_BEAR = 28;
public const LLAMA = 29;
public const PARROT = 30;
const ZOMBIE = 32;
const CREEPER = 33;
const SKELETON = 34;
const SPIDER = 35;
const ZOMBIE_PIGMAN = 36;
const SLIME = 37;
const ENDERMAN = 38;
const SILVERFISH = 39;
const CAVE_SPIDER = 40;
const GHAST = 41;
const MAGMA_CUBE = 42;
const BLAZE = 43;
const ZOMBIE_VILLAGER = 44;
const WITCH = 45;
const STRAY = 46;
const HUSK = 47;
const WITHER_SKELETON = 48;
const GUARDIAN = 49;
const ELDER_GUARDIAN = 50;
const NPC = 51;
const WITHER = 52;
const ENDER_DRAGON = 53;
const SHULKER = 54;
const ENDERMITE = 55;
const LEARN_TO_CODE_MASCOT = 56;
const VINDICATOR = 57;
public const ZOMBIE = 32;
public const CREEPER = 33;
public const SKELETON = 34;
public const SPIDER = 35;
public const ZOMBIE_PIGMAN = 36;
public const SLIME = 37;
public const ENDERMAN = 38;
public const SILVERFISH = 39;
public const CAVE_SPIDER = 40;
public const GHAST = 41;
public const MAGMA_CUBE = 42;
public const BLAZE = 43;
public const ZOMBIE_VILLAGER = 44;
public const WITCH = 45;
public const STRAY = 46;
public const HUSK = 47;
public const WITHER_SKELETON = 48;
public const GUARDIAN = 49;
public const ELDER_GUARDIAN = 50;
public const NPC = 51;
public const WITHER = 52;
public const ENDER_DRAGON = 53;
public const SHULKER = 54;
public const ENDERMITE = 55;
public const LEARN_TO_CODE_MASCOT = 56;
public const VINDICATOR = 57;
const ARMOR_STAND = 61;
const TRIPOD_CAMERA = 62;
const PLAYER = 63;
const ITEM = 64;
const TNT = 65;
const FALLING_BLOCK = 66;
const MOVING_BLOCK = 67;
const XP_BOTTLE = 68;
const XP_ORB = 69;
const EYE_OF_ENDER_SIGNAL = 70;
const ENDER_CRYSTAL = 71;
const FIREWORKS_ROCKET = 72;
public const ARMOR_STAND = 61;
public const TRIPOD_CAMERA = 62;
public const PLAYER = 63;
public const ITEM = 64;
public const TNT = 65;
public const FALLING_BLOCK = 66;
public const MOVING_BLOCK = 67;
public const XP_BOTTLE = 68;
public const XP_ORB = 69;
public const EYE_OF_ENDER_SIGNAL = 70;
public const ENDER_CRYSTAL = 71;
public const FIREWORKS_ROCKET = 72;
const SHULKER_BULLET = 76;
const FISHING_HOOK = 77;
const CHALKBOARD = 78;
const DRAGON_FIREBALL = 79;
const ARROW = 80;
const SNOWBALL = 81;
const EGG = 82;
const PAINTING = 83;
const MINECART = 84;
const LARGE_FIREBALL = 85;
const SPLASH_POTION = 86;
const ENDER_PEARL = 87;
const LEASH_KNOT = 88;
const WITHER_SKULL = 89;
const BOAT = 90;
const WITHER_SKULL_DANGEROUS = 91;
const LIGHTNING_BOLT = 93;
const SMALL_FIREBALL = 94;
const AREA_EFFECT_CLOUD = 95;
const HOPPER_MINECART = 96;
const TNT_MINECART = 97;
const CHEST_MINECART = 98;
public const SHULKER_BULLET = 76;
public const FISHING_HOOK = 77;
public const CHALKBOARD = 78;
public const DRAGON_FIREBALL = 79;
public const ARROW = 80;
public const SNOWBALL = 81;
public const EGG = 82;
public const PAINTING = 83;
public const MINECART = 84;
public const LARGE_FIREBALL = 85;
public const SPLASH_POTION = 86;
public const ENDER_PEARL = 87;
public const LEASH_KNOT = 88;
public const WITHER_SKULL = 89;
public const BOAT = 90;
public const WITHER_SKULL_DANGEROUS = 91;
public const LIGHTNING_BOLT = 93;
public const SMALL_FIREBALL = 94;
public const AREA_EFFECT_CLOUD = 95;
public const HOPPER_MINECART = 96;
public const TNT_MINECART = 97;
public const CHEST_MINECART = 98;
const COMMAND_BLOCK_MINECART = 100;
const LINGERING_POTION = 101;
const LLAMA_SPIT = 102;
const EVOCATION_FANG = 103;
const EVOCATION_ILLAGER = 104;
const VEX = 105;
public const COMMAND_BLOCK_MINECART = 100;
public const LINGERING_POTION = 101;
public const LLAMA_SPIT = 102;
public const EVOCATION_FANG = 103;
public const EVOCATION_ILLAGER = 104;
public const VEX = 105;
}

View File

@ -34,7 +34,7 @@ use pocketmine\nbt\tag\ByteTag;
use pocketmine\nbt\tag\IntTag;
class FallingSand extends Entity{
const NETWORK_ID = self::FALLING_BLOCK;
public const NETWORK_ID = self::FALLING_BLOCK;
public $width = 0.98;
public $height = 0.98;

View File

@ -44,12 +44,12 @@ use pocketmine\utils\UUID;
class Human extends Creature implements ProjectileSource, InventoryHolder{
const DATA_PLAYER_FLAG_SLEEP = 1;
const DATA_PLAYER_FLAG_DEAD = 2; //TODO: CHECK
public const DATA_PLAYER_FLAG_SLEEP = 1;
public const DATA_PLAYER_FLAG_DEAD = 2; //TODO: CHECK
const DATA_PLAYER_FLAGS = 27;
public const DATA_PLAYER_FLAGS = 27;
const DATA_PLAYER_BED_POSITION = 29;
public const DATA_PLAYER_BED_POSITION = 29;
/** @var PlayerInventory */
protected $inventory;

View File

@ -33,7 +33,7 @@ use pocketmine\network\mcpe\protocol\TakeItemEntityPacket;
use pocketmine\Player;
class Item extends Entity{
const NETWORK_ID = self::ITEM;
public const NETWORK_ID = self::ITEM;
/** @var string */
protected $owner = "";

View File

@ -30,7 +30,7 @@ use pocketmine\nbt\tag\ShortTag;
use pocketmine\network\mcpe\protocol\LevelEventPacket;
class PrimedTNT extends Entity implements Explosive{
const NETWORK_ID = self::TNT;
public const NETWORK_ID = self::TNT;
public $width = 0.98;
public $height = 0.98;

View File

@ -31,7 +31,7 @@ use pocketmine\math\Vector3;
use pocketmine\network\mcpe\protocol\EntityEventPacket;
class Squid extends WaterAnimal{
const NETWORK_ID = self::SQUID;
public const NETWORK_ID = self::SQUID;
public $width = 0.95;
public $height = 0.95;

View File

@ -24,13 +24,13 @@ declare(strict_types=1);
namespace pocketmine\entity;
class Villager extends Creature implements NPC, Ageable{
const PROFESSION_FARMER = 0;
const PROFESSION_LIBRARIAN = 1;
const PROFESSION_PRIEST = 2;
const PROFESSION_BLACKSMITH = 3;
const PROFESSION_BUTCHER = 4;
public const PROFESSION_FARMER = 0;
public const PROFESSION_LIBRARIAN = 1;
public const PROFESSION_PRIEST = 2;
public const PROFESSION_BLACKSMITH = 3;
public const PROFESSION_BUTCHER = 4;
const NETWORK_ID = self::VILLAGER;
public const NETWORK_ID = self::VILLAGER;
public $width = 0.6;
public $height = 1.8;

View File

@ -29,7 +29,7 @@ use pocketmine\item\ItemFactory;
use pocketmine\Player;
class Zombie extends Monster{
const NETWORK_ID = self::ZOMBIE;
public const NETWORK_ID = self::ZOMBIE;
public $width = 0.6;
public $height = 1.8;

View File

@ -33,7 +33,7 @@ use pocketmine\network\mcpe\protocol\TakeItemEntityPacket;
use pocketmine\Player;
class Arrow extends Projectile{
const NETWORK_ID = self::ARROW;
public const NETWORK_ID = self::ARROW;
public $width = 0.25;
public $height = 0.25;

View File

@ -24,7 +24,7 @@ declare(strict_types=1);
namespace pocketmine\entity\projectile;
class Egg extends Throwable{
const NETWORK_ID = self::EGG;
public const NETWORK_ID = self::EGG;
//TODO: spawn chickens on collision
}

View File

@ -37,7 +37,7 @@ use pocketmine\nbt\tag\CompoundTag;
abstract class Projectile extends Entity{
const DATA_SHOOTER_ID = 17;
public const DATA_SHOOTER_ID = 17;
protected $damage = 0;

View File

@ -24,6 +24,6 @@ declare(strict_types=1);
namespace pocketmine\entity\projectile;
class Snowball extends Throwable{
const NETWORK_ID = self::SNOWBALL;
public const NETWORK_ID = self::SNOWBALL;
}

View File

@ -37,29 +37,29 @@ abstract class EventPriority{
* Event call is of very low importance and should be ran first, to allow
* other plugins to further customise the outcome
*/
const LOWEST = 5;
public const LOWEST = 5;
/**
* Event call is of low importance
*/
const LOW = 4;
public const LOW = 4;
/**
* Event call is neither important or unimportant, and may be ran normally
*/
const NORMAL = 3;
public const NORMAL = 3;
/**
* Event call is of high importance
*/
const HIGH = 2;
public const HIGH = 2;
/**
* Event call is critical and must have the final say in what happens
* to the event
*/
const HIGHEST = 1;
public const HIGHEST = 1;
/**
* Event is listened to purely for monitoring the outcome of an event.
*
* No modifications to the event should be made under this priority
*/
const MONITOR = 0;
public const MONITOR = 0;
}

View File

@ -32,29 +32,29 @@ use pocketmine\event\Cancellable;
class EntityDamageEvent extends EntityEvent implements Cancellable{
public static $handlerList = null;
const MODIFIER_BASE = 0;
const MODIFIER_ARMOR = 1;
const MODIFIER_STRENGTH = 2;
const MODIFIER_WEAKNESS = 3;
const MODIFIER_RESISTANCE = 4;
const MODIFIER_ABSORPTION = 5;
public const MODIFIER_BASE = 0;
public const MODIFIER_ARMOR = 1;
public const MODIFIER_STRENGTH = 2;
public const MODIFIER_WEAKNESS = 3;
public const MODIFIER_RESISTANCE = 4;
public const MODIFIER_ABSORPTION = 5;
const CAUSE_CONTACT = 0;
const CAUSE_ENTITY_ATTACK = 1;
const CAUSE_PROJECTILE = 2;
const CAUSE_SUFFOCATION = 3;
const CAUSE_FALL = 4;
const CAUSE_FIRE = 5;
const CAUSE_FIRE_TICK = 6;
const CAUSE_LAVA = 7;
const CAUSE_DROWNING = 8;
const CAUSE_BLOCK_EXPLOSION = 9;
const CAUSE_ENTITY_EXPLOSION = 10;
const CAUSE_VOID = 11;
const CAUSE_SUICIDE = 12;
const CAUSE_MAGIC = 13;
const CAUSE_CUSTOM = 14;
const CAUSE_STARVATION = 15;
public const CAUSE_CONTACT = 0;
public const CAUSE_ENTITY_ATTACK = 1;
public const CAUSE_PROJECTILE = 2;
public const CAUSE_SUFFOCATION = 3;
public const CAUSE_FALL = 4;
public const CAUSE_FIRE = 5;
public const CAUSE_FIRE_TICK = 6;
public const CAUSE_LAVA = 7;
public const CAUSE_DROWNING = 8;
public const CAUSE_BLOCK_EXPLOSION = 9;
public const CAUSE_ENTITY_EXPLOSION = 10;
public const CAUSE_VOID = 11;
public const CAUSE_SUICIDE = 12;
public const CAUSE_MAGIC = 13;
public const CAUSE_CUSTOM = 14;
public const CAUSE_STARVATION = 15;
/** @var int */
private $cause;

View File

@ -29,11 +29,11 @@ use pocketmine\event\Cancellable;
class EntityRegainHealthEvent extends EntityEvent implements Cancellable{
public static $handlerList = null;
const CAUSE_REGEN = 0;
const CAUSE_EATING = 1;
const CAUSE_MAGIC = 2;
const CAUSE_CUSTOM = 3;
const CAUSE_SATURATION = 4;
public const CAUSE_REGEN = 0;
public const CAUSE_EATING = 1;
public const CAUSE_MAGIC = 2;
public const CAUSE_CUSTOM = 3;
public const CAUSE_SATURATION = 4;
/** @var float */
private $amount;

View File

@ -36,7 +36,7 @@ class PlayerAnimationEvent extends PlayerEvent implements Cancellable{
* @deprecated This is dependent on the protocol and should not be here.
* Use the constants in {@link pocketmine\network\mcpe\protocol\AnimatePacket} instead.
*/
const ARM_SWING = 1;
public const ARM_SWING = 1;
/** @var int */
private $animationType;

View File

@ -30,11 +30,11 @@ use pocketmine\Player;
class PlayerEditBookEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
const ACTION_REPLACE_PAGE = 0;
const ACTION_ADD_PAGE = 1;
const ACTION_DELETE_PAGE = 2;
const ACTION_SWAP_PAGES = 3;
const ACTION_SIGN_BOOK = 4;
public const ACTION_REPLACE_PAGE = 0;
public const ACTION_ADD_PAGE = 1;
public const ACTION_DELETE_PAGE = 2;
public const ACTION_SWAP_PAGES = 3;
public const ACTION_SIGN_BOOK = 4;
/** @var WritableBook */
private $oldBook;

View File

@ -30,17 +30,17 @@ use pocketmine\event\entity\EntityEvent;
class PlayerExhaustEvent extends EntityEvent implements Cancellable{
public static $handlerList = null;
const CAUSE_ATTACK = 1;
const CAUSE_DAMAGE = 2;
const CAUSE_MINING = 3;
const CAUSE_HEALTH_REGEN = 4;
const CAUSE_POTION = 5;
const CAUSE_WALKING = 6;
const CAUSE_SPRINTING = 7;
const CAUSE_SWIMMING = 8;
const CAUSE_JUMPING = 9;
const CAUSE_SPRINT_JUMPING = 10;
const CAUSE_CUSTOM = 11;
public const CAUSE_ATTACK = 1;
public const CAUSE_DAMAGE = 2;
public const CAUSE_MINING = 3;
public const CAUSE_HEALTH_REGEN = 4;
public const CAUSE_POTION = 5;
public const CAUSE_WALKING = 6;
public const CAUSE_SPRINTING = 7;
public const CAUSE_SWIMMING = 8;
public const CAUSE_JUMPING = 9;
public const CAUSE_SPRINT_JUMPING = 10;
public const CAUSE_CUSTOM = 11;
/** @var float */
private $amount;

View File

@ -37,11 +37,11 @@ use pocketmine\Player;
class PlayerInteractEvent extends PlayerEvent implements Cancellable{
public static $handlerList = null;
const LEFT_CLICK_BLOCK = 0;
const RIGHT_CLICK_BLOCK = 1;
const LEFT_CLICK_AIR = 2;
const RIGHT_CLICK_AIR = 3;
const PHYSICAL = 4;
public const LEFT_CLICK_BLOCK = 0;
public const RIGHT_CLICK_BLOCK = 1;
public const LEFT_CLICK_AIR = 2;
public const RIGHT_CLICK_AIR = 3;
public const PHYSICAL = 4;
/** @var Block */
protected $blockTouched;

View File

@ -31,7 +31,7 @@ use pocketmine\utils\Binary;
class QueryRegenerateEvent extends ServerEvent{
public static $handlerList = null;
const GAME_ID = "MINECRAFTPE";
public const GAME_ID = "MINECRAFTPE";
/** @var int */
private $timeout;

View File

@ -30,7 +30,7 @@ use pocketmine\item\Item;
use pocketmine\Player;
interface Inventory{
const MAX_STACK = 64;
public const MAX_STACK = 64;
/**
* @return int

View File

@ -26,14 +26,14 @@ namespace pocketmine\inventory;
use pocketmine\utils\UUID;
class MultiRecipe{
const TYPE_REPAIR_ITEM = "00000000-0000-0000-0000-000000000001";
const TYPE_MAP_EXTENDING = "D392B075-4BA1-40AE-8789-AF868D56F6CE";
const TYPE_MAP_CLONING = "85939755-BA10-4D9D-A4CC-EFB7A8E943C4";
const TYPE_MAP_UPGRADING = "AECD2294-4B94-434B-8667-4499BB2C9327";
const TYPE_BOOK_CLONING = "D1CA6B84-338E-4F2F-9C6B-76CC8B4BD98D";
const TYPE_BANNER_DUPLICATE = "B5C5D105-75A2-4076-AF2B-923EA2BF4BF0";
const TYPE_BANNER_ADD_PATTERN = "D81AAEAF-E172-4440-9225-868DF030D27B";
const TYPE_FIREWORKS = "00000000-0000-0000-0000-000000000002";
public const TYPE_REPAIR_ITEM = "00000000-0000-0000-0000-000000000001";
public const TYPE_MAP_EXTENDING = "D392B075-4BA1-40AE-8789-AF868D56F6CE";
public const TYPE_MAP_CLONING = "85939755-BA10-4D9D-A4CC-EFB7A8E943C4";
public const TYPE_MAP_UPGRADING = "AECD2294-4B94-434B-8667-4499BB2C9327";
public const TYPE_BOOK_CLONING = "D1CA6B84-338E-4F2F-9C6B-76CC8B4BD98D";
public const TYPE_BANNER_DUPLICATE = "B5C5D105-75A2-4076-AF2B-923EA2BF4BF0";
public const TYPE_BANNER_ADD_PATTERN = "D81AAEAF-E172-4440-9225-868DF030D27B";
public const TYPE_FIREWORKS = "00000000-0000-0000-0000-000000000002";
private $uuid;

View File

@ -31,11 +31,11 @@ class CreativeInventoryAction extends InventoryAction{
/**
* Player put an item into the creative window to destroy it.
*/
const TYPE_DELETE_ITEM = 0;
public const TYPE_DELETE_ITEM = 0;
/**
* Player took an item from the creative window.
*/
const TYPE_CREATE_ITEM = 1;
public const TYPE_CREATE_ITEM = 1;
protected $actionType;

View File

@ -32,10 +32,10 @@ use pocketmine\nbt\tag\StringTag;
use pocketmine\tile\Banner as TileBanner;
class Banner extends Item{
const TAG_BASE = TileBanner::TAG_BASE;
const TAG_PATTERNS = TileBanner::TAG_PATTERNS;
const TAG_PATTERN_COLOR = TileBanner::TAG_PATTERN_COLOR;
const TAG_PATTERN_NAME = TileBanner::TAG_PATTERN_NAME;
public const TAG_BASE = TileBanner::TAG_BASE;
public const TAG_PATTERNS = TileBanner::TAG_PATTERNS;
public const TAG_PATTERN_COLOR = TileBanner::TAG_PATTERN_COLOR;
public const TAG_PATTERN_NAME = TileBanner::TAG_PATTERN_NAME;
public function __construct(int $meta = 0){
$this->block = BlockFactory::get(Block::STANDING_BANNER);

View File

@ -26,10 +26,10 @@ namespace pocketmine\item;
use pocketmine\entity\Effect;
class Fish extends Food{
const FISH_FISH = 0;
const FISH_SALMON = 1;
const FISH_CLOWNFISH = 2;
const FISH_PUFFERFISH = 3;
public const FISH_FISH = 0;
public const FISH_SALMON = 1;
public const FISH_CLOWNFISH = 2;
public const FISH_PUFFERFISH = 3;
public function __construct(int $meta = 0){
$name = "Raw Fish";

View File

@ -45,12 +45,12 @@ use pocketmine\utils\Binary;
use pocketmine\utils\Config;
class Item implements ItemIds, \JsonSerializable{
const TAG_ENCH = "ench";
const TAG_DISPLAY = "display";
const TAG_BLOCK_ENTITY_TAG = "BlockEntityTag";
public const TAG_ENCH = "ench";
public const TAG_DISPLAY = "display";
public const TAG_BLOCK_ENTITY_TAG = "BlockEntityTag";
const TAG_DISPLAY_NAME = "Name";
const TAG_DISPLAY_LORE = "Lore";
public const TAG_DISPLAY_NAME = "Name";
public const TAG_DISPLAY_LORE = "Lore";
/** @var NBT */

View File

@ -27,219 +27,219 @@ use pocketmine\block\BlockIds;
interface ItemIds extends BlockIds{
const IRON_SHOVEL = 256;
const IRON_PICKAXE = 257;
const IRON_AXE = 258;
const FLINT_AND_STEEL = 259, FLINT_STEEL = 259;
const APPLE = 260;
const BOW = 261;
const ARROW = 262;
const COAL = 263;
const DIAMOND = 264;
const IRON_INGOT = 265;
const GOLD_INGOT = 266;
const IRON_SWORD = 267;
const WOODEN_SWORD = 268;
const WOODEN_SHOVEL = 269;
const WOODEN_PICKAXE = 270;
const WOODEN_AXE = 271;
const STONE_SWORD = 272;
const STONE_SHOVEL = 273;
const STONE_PICKAXE = 274;
const STONE_AXE = 275;
const DIAMOND_SWORD = 276;
const DIAMOND_SHOVEL = 277;
const DIAMOND_PICKAXE = 278;
const DIAMOND_AXE = 279;
const STICK = 280;
const BOWL = 281;
const MUSHROOM_STEW = 282;
const GOLDEN_SWORD = 283, GOLD_SWORD = 283;
const GOLDEN_SHOVEL = 284, GOLD_SHOVEL = 284;
const GOLDEN_PICKAXE = 285, GOLD_PICKAXE = 285;
const GOLDEN_AXE = 286, GOLD_AXE = 286;
const STRING = 287;
const FEATHER = 288;
const GUNPOWDER = 289;
const WOODEN_HOE = 290;
const STONE_HOE = 291;
const IRON_HOE = 292;
const DIAMOND_HOE = 293;
const GOLDEN_HOE = 294, GOLD_HOE = 294;
const SEEDS = 295, WHEAT_SEEDS = 295;
const WHEAT = 296;
const BREAD = 297;
const LEATHER_CAP = 298, LEATHER_HELMET = 298;
const LEATHER_CHESTPLATE = 299, LEATHER_TUNIC = 299;
const LEATHER_LEGGINGS = 300, LEATHER_PANTS = 300;
const LEATHER_BOOTS = 301;
const CHAINMAIL_HELMET = 302, CHAIN_HELMET = 302;
const CHAINMAIL_CHESTPLATE = 303, CHAIN_CHESTPLATE = 303;
const CHAINMAIL_LEGGINGS = 304, CHAIN_LEGGINGS = 304;
const CHAINMAIL_BOOTS = 305, CHAIN_BOOTS = 305;
const IRON_HELMET = 306;
const IRON_CHESTPLATE = 307;
const IRON_LEGGINGS = 308;
const IRON_BOOTS = 309;
const DIAMOND_HELMET = 310;
const DIAMOND_CHESTPLATE = 311;
const DIAMOND_LEGGINGS = 312;
const DIAMOND_BOOTS = 313;
const GOLDEN_HELMET = 314, GOLD_HELMET = 314;
const GOLDEN_CHESTPLATE = 315, GOLD_CHESTPLATE = 315;
const GOLDEN_LEGGINGS = 316, GOLD_LEGGINGS = 316;
const GOLDEN_BOOTS = 317, GOLD_BOOTS = 317;
const FLINT = 318;
const PORKCHOP = 319, RAW_PORKCHOP = 319;
const COOKED_PORKCHOP = 320;
const PAINTING = 321;
const GOLDEN_APPLE = 322;
const SIGN = 323;
const OAK_DOOR = 324, WOODEN_DOOR = 324;
const BUCKET = 325;
public const IRON_SHOVEL = 256;
public const IRON_PICKAXE = 257;
public const IRON_AXE = 258;
public const FLINT_AND_STEEL = 259, FLINT_STEEL = 259;
public const APPLE = 260;
public const BOW = 261;
public const ARROW = 262;
public const COAL = 263;
public const DIAMOND = 264;
public const IRON_INGOT = 265;
public const GOLD_INGOT = 266;
public const IRON_SWORD = 267;
public const WOODEN_SWORD = 268;
public const WOODEN_SHOVEL = 269;
public const WOODEN_PICKAXE = 270;
public const WOODEN_AXE = 271;
public const STONE_SWORD = 272;
public const STONE_SHOVEL = 273;
public const STONE_PICKAXE = 274;
public const STONE_AXE = 275;
public const DIAMOND_SWORD = 276;
public const DIAMOND_SHOVEL = 277;
public const DIAMOND_PICKAXE = 278;
public const DIAMOND_AXE = 279;
public const STICK = 280;
public const BOWL = 281;
public const MUSHROOM_STEW = 282;
public const GOLDEN_SWORD = 283, GOLD_SWORD = 283;
public const GOLDEN_SHOVEL = 284, GOLD_SHOVEL = 284;
public const GOLDEN_PICKAXE = 285, GOLD_PICKAXE = 285;
public const GOLDEN_AXE = 286, GOLD_AXE = 286;
public const STRING = 287;
public const FEATHER = 288;
public const GUNPOWDER = 289;
public const WOODEN_HOE = 290;
public const STONE_HOE = 291;
public const IRON_HOE = 292;
public const DIAMOND_HOE = 293;
public const GOLDEN_HOE = 294, GOLD_HOE = 294;
public const SEEDS = 295, WHEAT_SEEDS = 295;
public const WHEAT = 296;
public const BREAD = 297;
public const LEATHER_CAP = 298, LEATHER_HELMET = 298;
public const LEATHER_CHESTPLATE = 299, LEATHER_TUNIC = 299;
public const LEATHER_LEGGINGS = 300, LEATHER_PANTS = 300;
public const LEATHER_BOOTS = 301;
public const CHAINMAIL_HELMET = 302, CHAIN_HELMET = 302;
public const CHAINMAIL_CHESTPLATE = 303, CHAIN_CHESTPLATE = 303;
public const CHAINMAIL_LEGGINGS = 304, CHAIN_LEGGINGS = 304;
public const CHAINMAIL_BOOTS = 305, CHAIN_BOOTS = 305;
public const IRON_HELMET = 306;
public const IRON_CHESTPLATE = 307;
public const IRON_LEGGINGS = 308;
public const IRON_BOOTS = 309;
public const DIAMOND_HELMET = 310;
public const DIAMOND_CHESTPLATE = 311;
public const DIAMOND_LEGGINGS = 312;
public const DIAMOND_BOOTS = 313;
public const GOLDEN_HELMET = 314, GOLD_HELMET = 314;
public const GOLDEN_CHESTPLATE = 315, GOLD_CHESTPLATE = 315;
public const GOLDEN_LEGGINGS = 316, GOLD_LEGGINGS = 316;
public const GOLDEN_BOOTS = 317, GOLD_BOOTS = 317;
public const FLINT = 318;
public const PORKCHOP = 319, RAW_PORKCHOP = 319;
public const COOKED_PORKCHOP = 320;
public const PAINTING = 321;
public const GOLDEN_APPLE = 322;
public const SIGN = 323;
public const OAK_DOOR = 324, WOODEN_DOOR = 324;
public const BUCKET = 325;
const MINECART = 328;
const SADDLE = 329;
const IRON_DOOR = 330;
const REDSTONE = 331, REDSTONE_DUST = 331;
const SNOWBALL = 332;
const BOAT = 333;
const LEATHER = 334;
public const MINECART = 328;
public const SADDLE = 329;
public const IRON_DOOR = 330;
public const REDSTONE = 331, REDSTONE_DUST = 331;
public const SNOWBALL = 332;
public const BOAT = 333;
public const LEATHER = 334;
const BRICK = 336;
const CLAY = 337, CLAY_BALL = 337;
const REEDS = 338, SUGARCANE = 338;
const PAPER = 339;
const BOOK = 340;
const SLIMEBALL = 341, SLIME_BALL = 341;
const CHEST_MINECART = 342, MINECART_WITH_CHEST = 342;
public const BRICK = 336;
public const CLAY = 337, CLAY_BALL = 337;
public const REEDS = 338, SUGARCANE = 338;
public const PAPER = 339;
public const BOOK = 340;
public const SLIMEBALL = 341, SLIME_BALL = 341;
public const CHEST_MINECART = 342, MINECART_WITH_CHEST = 342;
const EGG = 344;
const COMPASS = 345;
const FISHING_ROD = 346;
const CLOCK = 347;
const GLOWSTONE_DUST = 348;
const FISH = 349, RAW_FISH = 349;
const COOKED_FISH = 350;
const DYE = 351;
const BONE = 352;
const SUGAR = 353;
const CAKE = 354;
const BED = 355;
const REPEATER = 356;
const COOKIE = 357;
const FILLED_MAP = 358;
const SHEARS = 359;
const MELON = 360, MELON_SLICE = 360;
const PUMPKIN_SEEDS = 361;
const MELON_SEEDS = 362;
const BEEF = 363, RAW_BEEF = 363;
const COOKED_BEEF = 364, STEAK = 364;
const CHICKEN = 365, RAW_CHICKEN = 365;
const COOKED_CHICKEN = 366;
const ROTTEN_FLESH = 367;
const ENDER_PEARL = 368;
const BLAZE_ROD = 369;
const GHAST_TEAR = 370;
const GOLDEN_NUGGET = 371, GOLD_NUGGET = 371;
const NETHER_WART = 372;
const POTION = 373;
const GLASS_BOTTLE = 374;
const SPIDER_EYE = 375;
const FERMENTED_SPIDER_EYE = 376;
const BLAZE_POWDER = 377;
const MAGMA_CREAM = 378;
const BREWING_STAND = 379;
const CAULDRON = 380;
const ENDER_EYE = 381;
const GLISTERING_MELON = 382, SPECKLED_MELON = 382;
const SPAWN_EGG = 383;
const BOTTLE_O_ENCHANTING = 384, EXPERIENCE_BOTTLE = 384;
const FIREBALL = 385, FIRE_CHARGE = 385;
const WRITABLE_BOOK = 386;
const WRITTEN_BOOK = 387;
const EMERALD = 388;
const FRAME = 389, ITEM_FRAME = 389;
const FLOWER_POT = 390;
const CARROT = 391;
const POTATO = 392;
const BAKED_POTATO = 393;
const POISONOUS_POTATO = 394;
const EMPTYMAP = 395, EMPTY_MAP = 395, MAP = 395;
const GOLDEN_CARROT = 396;
const MOB_HEAD = 397, SKULL = 397;
const CARROTONASTICK = 398, CARROT_ON_A_STICK = 398;
const NETHERSTAR = 399, NETHER_STAR = 399;
const PUMPKIN_PIE = 400;
const FIREWORKS = 401;
const FIREWORKSCHARGE = 402, FIREWORKS_CHARGE = 402;
const ENCHANTED_BOOK = 403;
const COMPARATOR = 404;
const NETHERBRICK = 405, NETHER_BRICK = 405;
const NETHER_QUARTZ = 406, QUARTZ = 406;
const MINECART_WITH_TNT = 407, TNT_MINECART = 407;
const HOPPER_MINECART = 408, MINECART_WITH_HOPPER = 408;
const PRISMARINE_SHARD = 409;
const HOPPER = 410;
const RABBIT = 411, RAW_RABBIT = 411;
const COOKED_RABBIT = 412;
const RABBIT_STEW = 413;
const RABBIT_FOOT = 414;
const RABBIT_HIDE = 415;
const HORSEARMORLEATHER = 416, HORSE_ARMOR_LEATHER = 416, LEATHER_HORSE_ARMOR = 416;
const HORSEARMORIRON = 417, HORSE_ARMOR_IRON = 417, IRON_HORSE_ARMOR = 417;
const GOLD_HORSE_ARMOR = 418, HORSEARMORGOLD = 418, HORSE_ARMOR_GOLD = 418;
const DIAMOND_HORSE_ARMOR = 419, HORSEARMORDIAMOND = 419, HORSE_ARMOR_DIAMOND = 419;
const LEAD = 420;
const NAMETAG = 421, NAME_TAG = 421;
const PRISMARINE_CRYSTALS = 422;
const MUTTONRAW = 423, MUTTON_RAW = 423, RAW_MUTTON = 423;
const COOKED_MUTTON = 424, MUTTONCOOKED = 424, MUTTON_COOKED = 424;
const ARMOR_STAND = 425;
const END_CRYSTAL = 426;
const SPRUCE_DOOR = 427;
const BIRCH_DOOR = 428;
const JUNGLE_DOOR = 429;
const ACACIA_DOOR = 430;
const DARK_OAK_DOOR = 431;
const CHORUS_FRUIT = 432;
const CHORUS_FRUIT_POPPED = 433;
public const EGG = 344;
public const COMPASS = 345;
public const FISHING_ROD = 346;
public const CLOCK = 347;
public const GLOWSTONE_DUST = 348;
public const FISH = 349, RAW_FISH = 349;
public const COOKED_FISH = 350;
public const DYE = 351;
public const BONE = 352;
public const SUGAR = 353;
public const CAKE = 354;
public const BED = 355;
public const REPEATER = 356;
public const COOKIE = 357;
public const FILLED_MAP = 358;
public const SHEARS = 359;
public const MELON = 360, MELON_SLICE = 360;
public const PUMPKIN_SEEDS = 361;
public const MELON_SEEDS = 362;
public const BEEF = 363, RAW_BEEF = 363;
public const COOKED_BEEF = 364, STEAK = 364;
public const CHICKEN = 365, RAW_CHICKEN = 365;
public const COOKED_CHICKEN = 366;
public const ROTTEN_FLESH = 367;
public const ENDER_PEARL = 368;
public const BLAZE_ROD = 369;
public const GHAST_TEAR = 370;
public const GOLDEN_NUGGET = 371, GOLD_NUGGET = 371;
public const NETHER_WART = 372;
public const POTION = 373;
public const GLASS_BOTTLE = 374;
public const SPIDER_EYE = 375;
public const FERMENTED_SPIDER_EYE = 376;
public const BLAZE_POWDER = 377;
public const MAGMA_CREAM = 378;
public const BREWING_STAND = 379;
public const CAULDRON = 380;
public const ENDER_EYE = 381;
public const GLISTERING_MELON = 382, SPECKLED_MELON = 382;
public const SPAWN_EGG = 383;
public const BOTTLE_O_ENCHANTING = 384, EXPERIENCE_BOTTLE = 384;
public const FIREBALL = 385, FIRE_CHARGE = 385;
public const WRITABLE_BOOK = 386;
public const WRITTEN_BOOK = 387;
public const EMERALD = 388;
public const FRAME = 389, ITEM_FRAME = 389;
public const FLOWER_POT = 390;
public const CARROT = 391;
public const POTATO = 392;
public const BAKED_POTATO = 393;
public const POISONOUS_POTATO = 394;
public const EMPTYMAP = 395, EMPTY_MAP = 395, MAP = 395;
public const GOLDEN_CARROT = 396;
public const MOB_HEAD = 397, SKULL = 397;
public const CARROTONASTICK = 398, CARROT_ON_A_STICK = 398;
public const NETHERSTAR = 399, NETHER_STAR = 399;
public const PUMPKIN_PIE = 400;
public const FIREWORKS = 401;
public const FIREWORKSCHARGE = 402, FIREWORKS_CHARGE = 402;
public const ENCHANTED_BOOK = 403;
public const COMPARATOR = 404;
public const NETHERBRICK = 405, NETHER_BRICK = 405;
public const NETHER_QUARTZ = 406, QUARTZ = 406;
public const MINECART_WITH_TNT = 407, TNT_MINECART = 407;
public const HOPPER_MINECART = 408, MINECART_WITH_HOPPER = 408;
public const PRISMARINE_SHARD = 409;
public const HOPPER = 410;
public const RABBIT = 411, RAW_RABBIT = 411;
public const COOKED_RABBIT = 412;
public const RABBIT_STEW = 413;
public const RABBIT_FOOT = 414;
public const RABBIT_HIDE = 415;
public const HORSEARMORLEATHER = 416, HORSE_ARMOR_LEATHER = 416, LEATHER_HORSE_ARMOR = 416;
public const HORSEARMORIRON = 417, HORSE_ARMOR_IRON = 417, IRON_HORSE_ARMOR = 417;
public const GOLD_HORSE_ARMOR = 418, HORSEARMORGOLD = 418, HORSE_ARMOR_GOLD = 418;
public const DIAMOND_HORSE_ARMOR = 419, HORSEARMORDIAMOND = 419, HORSE_ARMOR_DIAMOND = 419;
public const LEAD = 420;
public const NAMETAG = 421, NAME_TAG = 421;
public const PRISMARINE_CRYSTALS = 422;
public const MUTTONRAW = 423, MUTTON_RAW = 423, RAW_MUTTON = 423;
public const COOKED_MUTTON = 424, MUTTONCOOKED = 424, MUTTON_COOKED = 424;
public const ARMOR_STAND = 425;
public const END_CRYSTAL = 426;
public const SPRUCE_DOOR = 427;
public const BIRCH_DOOR = 428;
public const JUNGLE_DOOR = 429;
public const ACACIA_DOOR = 430;
public const DARK_OAK_DOOR = 431;
public const CHORUS_FRUIT = 432;
public const CHORUS_FRUIT_POPPED = 433;
const DRAGON_BREATH = 437;
const SPLASH_POTION = 438;
public const DRAGON_BREATH = 437;
public const SPLASH_POTION = 438;
const LINGERING_POTION = 441;
public const LINGERING_POTION = 441;
const COMMAND_BLOCK_MINECART = 443, MINECART_WITH_COMMAND_BLOCK = 443;
const ELYTRA = 444;
const SHULKER_SHELL = 445;
const BANNER = 446;
public const COMMAND_BLOCK_MINECART = 443, MINECART_WITH_COMMAND_BLOCK = 443;
public const ELYTRA = 444;
public const SHULKER_SHELL = 445;
public const BANNER = 446;
const TOTEM = 450;
public const TOTEM = 450;
const IRON_NUGGET = 452;
public const IRON_NUGGET = 452;
const BEETROOT = 457;
const BEETROOT_SEEDS = 458;
const BEETROOT_SOUP = 459;
const RAW_SALMON = 460, SALMON = 460;
const CLOWNFISH = 461;
const PUFFERFISH = 462;
const COOKED_SALMON = 463;
public const BEETROOT = 457;
public const BEETROOT_SEEDS = 458;
public const BEETROOT_SOUP = 459;
public const RAW_SALMON = 460, SALMON = 460;
public const CLOWNFISH = 461;
public const PUFFERFISH = 462;
public const COOKED_SALMON = 463;
const APPLEENCHANTED = 466, APPLE_ENCHANTED = 466, ENCHANTED_GOLDEN_APPLE = 466;
public const APPLEENCHANTED = 466, APPLE_ENCHANTED = 466, ENCHANTED_GOLDEN_APPLE = 466;
const RECORD_13 = 500;
const RECORD_CAT = 501;
const RECORD_BLOCKS = 502;
const RECORD_CHIRP = 503;
const RECORD_FAR = 504;
const RECORD_MALL = 505;
const RECORD_MELLOHI = 506;
const RECORD_STAL = 507;
const RECORD_STRAD = 508;
const RECORD_WARD = 509;
const RECORD_11 = 510;
const RECORD_WAIT = 511;
public const RECORD_13 = 500;
public const RECORD_CAT = 501;
public const RECORD_BLOCKS = 502;
public const RECORD_CHIRP = 503;
public const RECORD_FAR = 504;
public const RECORD_MALL = 505;
public const RECORD_MELLOHI = 506;
public const RECORD_STAL = 507;
public const RECORD_STRAD = 508;
public const RECORD_WARD = 509;
public const RECORD_11 = 510;
public const RECORD_WAIT = 511;
}

View File

@ -27,18 +27,18 @@ use pocketmine\block\Block;
use pocketmine\entity\Entity;
abstract class Tool extends Durable{
const TIER_WOODEN = 1;
const TIER_GOLD = 2;
const TIER_STONE = 3;
const TIER_IRON = 4;
const TIER_DIAMOND = 5;
public const TIER_WOODEN = 1;
public const TIER_GOLD = 2;
public const TIER_STONE = 3;
public const TIER_IRON = 4;
public const TIER_DIAMOND = 5;
const TYPE_NONE = 0;
const TYPE_SWORD = 1;
const TYPE_SHOVEL = 2;
const TYPE_PICKAXE = 3;
const TYPE_AXE = 4;
const TYPE_SHEARS = 5;
public const TYPE_NONE = 0;
public const TYPE_SWORD = 1;
public const TYPE_SHOVEL = 2;
public const TYPE_PICKAXE = 3;
public const TYPE_AXE = 4;
public const TYPE_SHEARS = 5;
public function getMaxStackSize() : int{
return 1;

View File

@ -30,9 +30,9 @@ use pocketmine\nbt\tag\StringTag;
class WritableBook extends Item{
const TAG_PAGES = "pages"; //TAG_List<TAG_Compound>
const TAG_PAGE_TEXT = "text"; //TAG_String
const TAG_PAGE_PHOTONAME = "photoname"; //TAG_String - TODO
public const TAG_PAGES = "pages"; //TAG_List<TAG_Compound>
public const TAG_PAGE_TEXT = "text"; //TAG_String
public const TAG_PAGE_PHOTONAME = "photoname"; //TAG_String - TODO
public function __construct(int $meta = 0){
parent::__construct(self::WRITABLE_BOOK, $meta, "Book & Quill");

View File

@ -25,14 +25,14 @@ namespace pocketmine\item;
class WrittenBook extends WritableBook{
const GENERATION_ORIGINAL = 0;
const GENERATION_COPY = 1;
const GENERATION_COPY_OF_COPY = 2;
const GENERATION_TATTERED = 3;
public const GENERATION_ORIGINAL = 0;
public const GENERATION_COPY = 1;
public const GENERATION_COPY_OF_COPY = 2;
public const GENERATION_TATTERED = 3;
const TAG_GENERATION = "generation"; //TAG_Int
const TAG_AUTHOR = "author"; //TAG_String
const TAG_TITLE = "title"; //TAG_String
public const TAG_GENERATION = "generation"; //TAG_Int
public const TAG_AUTHOR = "author"; //TAG_String
public const TAG_TITLE = "title"; //TAG_String
public function __construct(int $meta = 0){
Item::__construct(self::WRITTEN_BOOK, $meta, "Written Book");

View File

@ -26,62 +26,62 @@ namespace pocketmine\item\enchantment;
class Enchantment{
const PROTECTION = 0;
const FIRE_PROTECTION = 1;
const FEATHER_FALLING = 2;
const BLAST_PROTECTION = 3;
const PROJECTILE_PROTECTION = 4;
const THORNS = 5;
const RESPIRATION = 6;
const DEPTH_STRIDER = 7;
const AQUA_AFFINITY = 8;
const SHARPNESS = 9;
const SMITE = 10;
const BANE_OF_ARTHROPODS = 11;
const KNOCKBACK = 12;
const FIRE_ASPECT = 13;
const LOOTING = 14;
const EFFICIENCY = 15;
const SILK_TOUCH = 16;
const UNBREAKING = 17;
const FORTUNE = 18;
const POWER = 19;
const PUNCH = 20;
const FLAME = 21;
const INFINITY = 22;
const LUCK_OF_THE_SEA = 23;
const LURE = 24;
const FROST_WALKER = 25;
const MENDING = 26;
public const PROTECTION = 0;
public const FIRE_PROTECTION = 1;
public const FEATHER_FALLING = 2;
public const BLAST_PROTECTION = 3;
public const PROJECTILE_PROTECTION = 4;
public const THORNS = 5;
public const RESPIRATION = 6;
public const DEPTH_STRIDER = 7;
public const AQUA_AFFINITY = 8;
public const SHARPNESS = 9;
public const SMITE = 10;
public const BANE_OF_ARTHROPODS = 11;
public const KNOCKBACK = 12;
public const FIRE_ASPECT = 13;
public const LOOTING = 14;
public const EFFICIENCY = 15;
public const SILK_TOUCH = 16;
public const UNBREAKING = 17;
public const FORTUNE = 18;
public const POWER = 19;
public const PUNCH = 20;
public const FLAME = 21;
public const INFINITY = 22;
public const LUCK_OF_THE_SEA = 23;
public const LURE = 24;
public const FROST_WALKER = 25;
public const MENDING = 26;
const RARITY_COMMON = 0;
const RARITY_UNCOMMON = 1;
const RARITY_RARE = 2;
const RARITY_MYTHIC = 3;
public const RARITY_COMMON = 0;
public const RARITY_UNCOMMON = 1;
public const RARITY_RARE = 2;
public const RARITY_MYTHIC = 3;
const ACTIVATION_EQUIP = 0;
const ACTIVATION_HELD = 1;
const ACTIVATION_SELF = 2;
public const ACTIVATION_EQUIP = 0;
public const ACTIVATION_HELD = 1;
public const ACTIVATION_SELF = 2;
const SLOT_NONE = 0;
const SLOT_ALL = 0b11111111111111;
const SLOT_ARMOR = 0b1111;
const SLOT_HEAD = 0b1;
const SLOT_TORSO = 0b10;
const SLOT_LEGS = 0b100;
const SLOT_FEET = 0b1000;
const SLOT_SWORD = 0b10000;
const SLOT_BOW = 0b100000;
const SLOT_TOOL = 0b111000000;
const SLOT_HOE = 0b1000000;
const SLOT_SHEARS = 0b10000000;
const SLOT_FLINT_AND_STEEL = 0b10000000;
const SLOT_DIG = 0b111000000000;
const SLOT_AXE = 0b1000000000;
const SLOT_PICKAXE = 0b10000000000;
const SLOT_SHOVEL = 0b10000000000;
const SLOT_FISHING_ROD = 0b100000000000;
const SLOT_CARROT_STICK = 0b1000000000000;
public const SLOT_NONE = 0;
public const SLOT_ALL = 0b11111111111111;
public const SLOT_ARMOR = 0b1111;
public const SLOT_HEAD = 0b1;
public const SLOT_TORSO = 0b10;
public const SLOT_LEGS = 0b100;
public const SLOT_FEET = 0b1000;
public const SLOT_SWORD = 0b10000;
public const SLOT_BOW = 0b100000;
public const SLOT_TOOL = 0b111000000;
public const SLOT_HOE = 0b1000000;
public const SLOT_SHEARS = 0b10000000;
public const SLOT_FLINT_AND_STEEL = 0b10000000;
public const SLOT_DIG = 0b111000000000;
public const SLOT_AXE = 0b1000000000;
public const SLOT_PICKAXE = 0b10000000000;
public const SLOT_SHOVEL = 0b10000000000;
public const SLOT_FISHING_ROD = 0b100000000000;
public const SLOT_CARROT_STICK = 0b1000000000000;
/** @var Enchantment[] */
protected static $enchantments;

View File

@ -29,7 +29,7 @@ use pocketmine\utils\MainLogger;
class BaseLang{
const FALLBACK_LANGUAGE = "eng";
public const FALLBACK_LANGUAGE = "eng";
public static function getLanguageList(string $path = "") : array{
if($path === ""){

View File

@ -93,26 +93,26 @@ class Level implements ChunkManager, Metadatable{
private static $levelIdCounter = 1;
private static $chunkLoaderCounter = 1;
const Y_MASK = 0xFF;
const Y_MAX = 0x100; //256
public const Y_MASK = 0xFF;
public const Y_MAX = 0x100; //256
const BLOCK_UPDATE_NORMAL = 1;
const BLOCK_UPDATE_RANDOM = 2;
const BLOCK_UPDATE_SCHEDULED = 3;
const BLOCK_UPDATE_WEAK = 4;
const BLOCK_UPDATE_TOUCH = 5;
public const BLOCK_UPDATE_NORMAL = 1;
public const BLOCK_UPDATE_RANDOM = 2;
public const BLOCK_UPDATE_SCHEDULED = 3;
public const BLOCK_UPDATE_WEAK = 4;
public const BLOCK_UPDATE_TOUCH = 5;
const TIME_DAY = 0;
const TIME_SUNSET = 12000;
const TIME_NIGHT = 14000;
const TIME_SUNRISE = 23000;
public const TIME_DAY = 0;
public const TIME_SUNSET = 12000;
public const TIME_NIGHT = 14000;
public const TIME_SUNRISE = 23000;
const TIME_FULL = 24000;
public const TIME_FULL = 24000;
const DIFFICULTY_PEACEFUL = 0;
const DIFFICULTY_EASY = 1;
const DIFFICULTY_NORMAL = 2;
const DIFFICULTY_HARD = 3;
public const DIFFICULTY_PEACEFUL = 0;
public const DIFFICULTY_EASY = 1;
public const DIFFICULTY_NORMAL = 2;
public const DIFFICULTY_HARD = 3;
/** @var Tile[] */
private $tiles = [];

View File

@ -27,8 +27,8 @@ use pocketmine\entity\Entity;
use pocketmine\math\Vector3;
class MovingObjectPosition{
const TYPE_BLOCK_COLLISION = 0;
const TYPE_ENTITY_COLLISION = 1;
public const TYPE_BLOCK_COLLISION = 0;
public const TYPE_ENTITY_COLLISION = 1;
/** @var int */
public $typeOfHit;

View File

@ -38,7 +38,7 @@ use pocketmine\utils\BinaryStream;
class Chunk{
const MAX_SUBCHUNKS = 16;
public const MAX_SUBCHUNKS = 16;
protected $x;
protected $z;

View File

@ -44,35 +44,35 @@ use pocketmine\utils\MainLogger;
class LevelDB extends BaseLevelProvider{
//According to Tomasso, these aren't supposed to be readable anymore. Thankfully he didn't change the readable ones...
const TAG_DATA_2D = "\x2d";
const TAG_DATA_2D_LEGACY = "\x2e";
const TAG_SUBCHUNK_PREFIX = "\x2f";
const TAG_LEGACY_TERRAIN = "0";
const TAG_BLOCK_ENTITY = "1";
const TAG_ENTITY = "2";
const TAG_PENDING_TICK = "3";
const TAG_BLOCK_EXTRA_DATA = "4";
const TAG_BIOME_STATE = "5";
const TAG_STATE_FINALISATION = "6";
public const TAG_DATA_2D = "\x2d";
public const TAG_DATA_2D_LEGACY = "\x2e";
public const TAG_SUBCHUNK_PREFIX = "\x2f";
public const TAG_LEGACY_TERRAIN = "0";
public const TAG_BLOCK_ENTITY = "1";
public const TAG_ENTITY = "2";
public const TAG_PENDING_TICK = "3";
public const TAG_BLOCK_EXTRA_DATA = "4";
public const TAG_BIOME_STATE = "5";
public const TAG_STATE_FINALISATION = "6";
const TAG_BORDER_BLOCKS = "8";
const TAG_HARDCODED_SPAWNERS = "9";
public const TAG_BORDER_BLOCKS = "8";
public const TAG_HARDCODED_SPAWNERS = "9";
const FINALISATION_NEEDS_INSTATICKING = 0;
const FINALISATION_NEEDS_POPULATION = 1;
const FINALISATION_DONE = 2;
public const FINALISATION_NEEDS_INSTATICKING = 0;
public const FINALISATION_NEEDS_POPULATION = 1;
public const FINALISATION_DONE = 2;
const TAG_VERSION = "v";
public const TAG_VERSION = "v";
const ENTRY_FLAT_WORLD_LAYERS = "game_flatworldlayers";
public const ENTRY_FLAT_WORLD_LAYERS = "game_flatworldlayers";
const GENERATOR_LIMITED = 0;
const GENERATOR_INFINITE = 1;
const GENERATOR_FLAT = 2;
public const GENERATOR_LIMITED = 0;
public const GENERATOR_INFINITE = 1;
public const GENERATOR_FLAT = 2;
const CURRENT_STORAGE_VERSION = 6; //Current MCPE level format version
const CURRENT_LEVEL_CHUNK_VERSION = 7;
const CURRENT_LEVEL_SUBCHUNK_VERSION = 0;
public const CURRENT_STORAGE_VERSION = 6; //Current MCPE level format version
public const CURRENT_LEVEL_CHUNK_VERSION = 7;
public const CURRENT_LEVEL_SUBCHUNK_VERSION = 0;
/** @var Chunk[] */
protected $chunks = [];

View File

@ -36,7 +36,7 @@ use pocketmine\utils\MainLogger;
class Anvil extends McRegion{
const REGION_FILE_EXTENSION = "mca";
public const REGION_FILE_EXTENSION = "mca";
public function nbtSerialize(Chunk $chunk) : string{
$nbt = new CompoundTag("Level", []);

View File

@ -38,7 +38,7 @@ use pocketmine\utils\MainLogger;
class McRegion extends BaseLevelProvider{
const REGION_FILE_EXTENSION = "mcr";
public const REGION_FILE_EXTENSION = "mcr";
/** @var RegionLoader[] */
protected $regions = [];

View File

@ -33,7 +33,7 @@ use pocketmine\nbt\tag\CompoundTag;
*/
class PMAnvil extends Anvil{
const REGION_FILE_EXTENSION = "mcapm";
public const REGION_FILE_EXTENSION = "mcapm";
protected function serializeSubChunk(SubChunk $subChunk) : CompoundTag{
return new CompoundTag("", [

View File

@ -29,13 +29,13 @@ use pocketmine\utils\Binary;
use pocketmine\utils\MainLogger;
class RegionLoader{
const VERSION = 1;
const COMPRESSION_GZIP = 1;
const COMPRESSION_ZLIB = 2;
public const VERSION = 1;
public const COMPRESSION_GZIP = 1;
public const COMPRESSION_ZLIB = 2;
const MAX_SECTOR_LENGTH = 256 << 12; //256 sectors, (1 MiB)
const REGION_HEADER_LENGTH = 8192; //4096 location table + 4096 timestamps
const MAX_REGION_FILE_SIZE = 32 * 32 * self::MAX_SECTOR_LENGTH + self::REGION_HEADER_LENGTH; //32 * 32 1MiB chunks + header size
public const MAX_SECTOR_LENGTH = 256 << 12; //256 sectors, (1 MiB)
public const REGION_HEADER_LENGTH = 8192; //4096 location table + 4096 timestamps
public const MAX_REGION_FILE_SIZE = 32 * 32 * self::MAX_SECTOR_LENGTH + self::REGION_HEADER_LENGTH; //32 * 32 1MiB chunks + header size
public static $COMPRESSION_LEVEL = 7;

View File

@ -40,27 +40,27 @@ use pocketmine\utils\Random;
abstract class Biome{
const OCEAN = 0;
const PLAINS = 1;
const DESERT = 2;
const MOUNTAINS = 3;
const FOREST = 4;
const TAIGA = 5;
const SWAMP = 6;
const RIVER = 7;
public const OCEAN = 0;
public const PLAINS = 1;
public const DESERT = 2;
public const MOUNTAINS = 3;
public const FOREST = 4;
public const TAIGA = 5;
public const SWAMP = 6;
public const RIVER = 7;
const HELL = 8;
public const HELL = 8;
const ICE_PLAINS = 12;
public const ICE_PLAINS = 12;
const SMALL_MOUNTAINS = 20;
public const SMALL_MOUNTAINS = 20;
const BIRCH_FOREST = 27;
public const BIRCH_FOREST = 27;
const MAX_BIOMES = 256;
public const MAX_BIOMES = 256;
/** @var Biome[] */
private static $biomes = [];

View File

@ -29,8 +29,8 @@ use pocketmine\level\generator\populator\Tree;
class ForestBiome extends GrassyBiome{
const TYPE_NORMAL = 0;
const TYPE_BIRCH = 1;
public const TYPE_NORMAL = 0;
public const TYPE_BIRCH = 1;
public $type;

View File

@ -28,47 +28,47 @@ use pocketmine\network\mcpe\protocol\DataPacket;
abstract class Particle extends Vector3{
const TYPE_BUBBLE = 1;
const TYPE_CRITICAL = 2;
const TYPE_BLOCK_FORCE_FIELD = 3;
const TYPE_SMOKE = 4;
const TYPE_EXPLODE = 5;
const TYPE_EVAPORATION = 6;
const TYPE_FLAME = 7;
const TYPE_LAVA = 8;
const TYPE_LARGE_SMOKE = 9;
const TYPE_REDSTONE = 10;
const TYPE_RISING_RED_DUST = 11;
const TYPE_ITEM_BREAK = 12;
const TYPE_SNOWBALL_POOF = 13;
const TYPE_HUGE_EXPLODE = 14;
const TYPE_HUGE_EXPLODE_SEED = 15;
const TYPE_MOB_FLAME = 16;
const TYPE_HEART = 17;
const TYPE_TERRAIN = 18;
const TYPE_SUSPENDED_TOWN = 19, TYPE_TOWN_AURA = 19;
const TYPE_PORTAL = 20;
const TYPE_SPLASH = 21, TYPE_WATER_SPLASH = 21;
const TYPE_WATER_WAKE = 22;
const TYPE_DRIP_WATER = 23;
const TYPE_DRIP_LAVA = 24;
const TYPE_FALLING_DUST = 25, TYPE_DUST = 25;
const TYPE_MOB_SPELL = 26;
const TYPE_MOB_SPELL_AMBIENT = 27;
const TYPE_MOB_SPELL_INSTANTANEOUS = 28;
const TYPE_INK = 29;
const TYPE_SLIME = 30;
const TYPE_RAIN_SPLASH = 31;
const TYPE_VILLAGER_ANGRY = 32;
const TYPE_VILLAGER_HAPPY = 33;
const TYPE_ENCHANTMENT_TABLE = 34;
const TYPE_TRACKING_EMITTER = 35;
const TYPE_NOTE = 36;
const TYPE_WITCH_SPELL = 37;
const TYPE_CARROT = 38;
public const TYPE_BUBBLE = 1;
public const TYPE_CRITICAL = 2;
public const TYPE_BLOCK_FORCE_FIELD = 3;
public const TYPE_SMOKE = 4;
public const TYPE_EXPLODE = 5;
public const TYPE_EVAPORATION = 6;
public const TYPE_FLAME = 7;
public const TYPE_LAVA = 8;
public const TYPE_LARGE_SMOKE = 9;
public const TYPE_REDSTONE = 10;
public const TYPE_RISING_RED_DUST = 11;
public const TYPE_ITEM_BREAK = 12;
public const TYPE_SNOWBALL_POOF = 13;
public const TYPE_HUGE_EXPLODE = 14;
public const TYPE_HUGE_EXPLODE_SEED = 15;
public const TYPE_MOB_FLAME = 16;
public const TYPE_HEART = 17;
public const TYPE_TERRAIN = 18;
public const TYPE_SUSPENDED_TOWN = 19, TYPE_TOWN_AURA = 19;
public const TYPE_PORTAL = 20;
public const TYPE_SPLASH = 21, TYPE_WATER_SPLASH = 21;
public const TYPE_WATER_WAKE = 22;
public const TYPE_DRIP_WATER = 23;
public const TYPE_DRIP_LAVA = 24;
public const TYPE_FALLING_DUST = 25, TYPE_DUST = 25;
public const TYPE_MOB_SPELL = 26;
public const TYPE_MOB_SPELL_AMBIENT = 27;
public const TYPE_MOB_SPELL_INSTANTANEOUS = 28;
public const TYPE_INK = 29;
public const TYPE_SLIME = 30;
public const TYPE_RAIN_SPLASH = 31;
public const TYPE_VILLAGER_ANGRY = 32;
public const TYPE_VILLAGER_HAPPY = 33;
public const TYPE_ENCHANTMENT_TABLE = 34;
public const TYPE_TRACKING_EMITTER = 35;
public const TYPE_NOTE = 36;
public const TYPE_WITCH_SPELL = 37;
public const TYPE_CARROT = 38;
//39 unknown
const TYPE_END_ROD = 40;
const TYPE_DRAGONS_BREATH = 41;
public const TYPE_END_ROD = 40;
public const TYPE_DRAGONS_BREATH = 41;
/**
* @return DataPacket|DataPacket[]

View File

@ -25,12 +25,12 @@ namespace pocketmine\math;
class Vector3{
const SIDE_DOWN = 0;
const SIDE_UP = 1;
const SIDE_NORTH = 2;
const SIDE_SOUTH = 3;
const SIDE_WEST = 4;
const SIDE_EAST = 5;
public const SIDE_DOWN = 0;
public const SIDE_UP = 1;
public const SIDE_NORTH = 2;
public const SIDE_SOUTH = 3;
public const SIDE_WEST = 4;
public const SIDE_EAST = 5;
public $x;
public $y;

View File

@ -53,20 +53,20 @@ use pocketmine\utils\Binary;
*/
class NBT{
const LITTLE_ENDIAN = 0;
const BIG_ENDIAN = 1;
const TAG_End = 0;
const TAG_Byte = 1;
const TAG_Short = 2;
const TAG_Int = 3;
const TAG_Long = 4;
const TAG_Float = 5;
const TAG_Double = 6;
const TAG_ByteArray = 7;
const TAG_String = 8;
const TAG_List = 9;
const TAG_Compound = 10;
const TAG_IntArray = 11;
public const LITTLE_ENDIAN = 0;
public const BIG_ENDIAN = 1;
public const TAG_End = 0;
public const TAG_Byte = 1;
public const TAG_Short = 2;
public const TAG_Int = 3;
public const TAG_Long = 4;
public const TAG_Float = 5;
public const TAG_Double = 6;
public const TAG_ByteArray = 7;
public const TAG_String = 8;
public const TAG_List = 9;
public const TAG_Compound = 10;
public const TAG_IntArray = 11;
public $buffer;
public $offset;

View File

@ -30,7 +30,7 @@ use pocketmine\Server;
class VerifyLoginTask extends AsyncTask{
const MOJANG_ROOT_PUBLIC_KEY = "MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE8ELkixyLcwlZryUQcu1TvPOmI2B7vX83ndnWRUaXm74wFfa5f/lwQNTfrLVHa2PmenpGI6JhIMUJaWZrjmMj90NoKNFSNBuKdm8rYiXsfaz3K36x/1U26HpG0ZxK/V1V";
public const MOJANG_ROOT_PUBLIC_KEY = "MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE8ELkixyLcwlZryUQcu1TvPOmI2B7vX83ndnWRUaXm74wFfa5f/lwQNTfrLVHa2PmenpGI6JhIMUJaWZrjmMj90NoKNFSNBuKdm8rYiXsfaz3K36x/1U26HpG0ZxK/V1V";
/** @var LoginPacket */
private $packet;

View File

@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class AddBehaviorTreePacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::ADD_BEHAVIOR_TREE_PACKET;
public const NETWORK_ID = ProtocolInfo::ADD_BEHAVIOR_TREE_PACKET;
/** @var string */
public $unknownString1;

View File

@ -31,7 +31,7 @@ use pocketmine\network\mcpe\NetworkSession;
use pocketmine\network\mcpe\protocol\types\EntityLink;
class AddEntityPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::ADD_ENTITY_PACKET;
public const NETWORK_ID = ProtocolInfo::ADD_ENTITY_PACKET;
/** @var int|null */
public $entityUniqueId = null; //TODO

View File

@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class AddHangingEntityPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::ADD_HANGING_ENTITY_PACKET;
public const NETWORK_ID = ProtocolInfo::ADD_HANGING_ENTITY_PACKET;
/** @var int */
public $entityUniqueId;

View File

@ -30,7 +30,7 @@ use pocketmine\math\Vector3;
use pocketmine\network\mcpe\NetworkSession;
class AddItemEntityPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::ADD_ITEM_ENTITY_PACKET;
public const NETWORK_ID = ProtocolInfo::ADD_ITEM_ENTITY_PACKET;
/** @var int|null */
public $entityUniqueId = null; //TODO

View File

@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class AddPaintingPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::ADD_PAINTING_PACKET;
public const NETWORK_ID = ProtocolInfo::ADD_PAINTING_PACKET;
/** @var int|null */
public $entityUniqueId = null; //TODO

View File

@ -32,7 +32,7 @@ use pocketmine\network\mcpe\protocol\types\EntityLink;
use pocketmine\utils\UUID;
class AddPlayerPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::ADD_PLAYER_PACKET;
public const NETWORK_ID = ProtocolInfo::ADD_PLAYER_PACKET;
/** @var UUID */
public $uuid;

View File

@ -30,38 +30,38 @@ use pocketmine\network\mcpe\NetworkSession;
use pocketmine\network\mcpe\protocol\types\PlayerPermissions;
class AdventureSettingsPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::ADVENTURE_SETTINGS_PACKET;
public const NETWORK_ID = ProtocolInfo::ADVENTURE_SETTINGS_PACKET;
const PERMISSION_NORMAL = 0;
const PERMISSION_OPERATOR = 1;
const PERMISSION_HOST = 2;
const PERMISSION_AUTOMATION = 3;
const PERMISSION_ADMIN = 4;
public const PERMISSION_NORMAL = 0;
public const PERMISSION_OPERATOR = 1;
public const PERMISSION_HOST = 2;
public const PERMISSION_AUTOMATION = 3;
public const PERMISSION_ADMIN = 4;
/**
* This constant is used to identify flags that should be set on the second field. In a sensible world, these
* flags would all be set on the same packet field, but as of MCPE 1.2, the new abilities flags have for some
* reason been assigned a separate field.
*/
const BITFLAG_SECOND_SET = 1 << 16;
public const BITFLAG_SECOND_SET = 1 << 16;
const WORLD_IMMUTABLE = 0x01;
const NO_PVP = 0x02;
public const WORLD_IMMUTABLE = 0x01;
public const NO_PVP = 0x02;
const AUTO_JUMP = 0x20;
const ALLOW_FLIGHT = 0x40;
const NO_CLIP = 0x80;
const WORLD_BUILDER = 0x100;
const FLYING = 0x200;
const MUTED = 0x400;
public const AUTO_JUMP = 0x20;
public const ALLOW_FLIGHT = 0x40;
public const NO_CLIP = 0x80;
public const WORLD_BUILDER = 0x100;
public const FLYING = 0x200;
public const MUTED = 0x400;
const BUILD_AND_MINE = 0x01 | self::BITFLAG_SECOND_SET;
const DOORS_AND_SWITCHES = 0x02 | self::BITFLAG_SECOND_SET;
const OPEN_CONTAINERS = 0x04 | self::BITFLAG_SECOND_SET;
const ATTACK_PLAYERS = 0x08 | self::BITFLAG_SECOND_SET;
const ATTACK_MOBS = 0x10 | self::BITFLAG_SECOND_SET;
const OPERATOR = 0x20 | self::BITFLAG_SECOND_SET;
const TELEPORT = 0x80 | self::BITFLAG_SECOND_SET;
public const BUILD_AND_MINE = 0x01 | self::BITFLAG_SECOND_SET;
public const DOORS_AND_SWITCHES = 0x02 | self::BITFLAG_SECOND_SET;
public const OPEN_CONTAINERS = 0x04 | self::BITFLAG_SECOND_SET;
public const ATTACK_PLAYERS = 0x08 | self::BITFLAG_SECOND_SET;
public const ATTACK_MOBS = 0x10 | self::BITFLAG_SECOND_SET;
public const OPERATOR = 0x20 | self::BITFLAG_SECOND_SET;
public const TELEPORT = 0x80 | self::BITFLAG_SECOND_SET;
/** @var int */
public $flags = 0;

View File

@ -29,12 +29,12 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class AnimatePacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::ANIMATE_PACKET;
public const NETWORK_ID = ProtocolInfo::ANIMATE_PACKET;
const ACTION_SWING_ARM = 1;
public const ACTION_SWING_ARM = 1;
const ACTION_STOP_SLEEP = 3;
const ACTION_CRITICAL_HIT = 4;
public const ACTION_STOP_SLEEP = 3;
public const ACTION_CRITICAL_HIT = 4;
/** @var int */
public $action;

View File

@ -28,45 +28,45 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class AvailableCommandsPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::AVAILABLE_COMMANDS_PACKET;
public const NETWORK_ID = ProtocolInfo::AVAILABLE_COMMANDS_PACKET;
/**
* This flag is set on all types EXCEPT the TEMPLATE type. Not completely sure what this is for, but it is required
* for the argtype to work correctly. VALID seems as good a name as any.
*/
const ARG_FLAG_VALID = 0x100000;
public const ARG_FLAG_VALID = 0x100000;
/**
* Basic parameter types. These must be combined with the ARG_FLAG_VALID constant.
* ARG_FLAG_VALID | (type const)
*/
const ARG_TYPE_INT = 0x01;
const ARG_TYPE_FLOAT = 0x02;
const ARG_TYPE_VALUE = 0x03;
const ARG_TYPE_TARGET = 0x04;
public const ARG_TYPE_INT = 0x01;
public const ARG_TYPE_FLOAT = 0x02;
public const ARG_TYPE_VALUE = 0x03;
public const ARG_TYPE_TARGET = 0x04;
const ARG_TYPE_STRING = 0x0d;
const ARG_TYPE_POSITION = 0x0e;
public const ARG_TYPE_STRING = 0x0d;
public const ARG_TYPE_POSITION = 0x0e;
const ARG_TYPE_RAWTEXT = 0x11;
public const ARG_TYPE_RAWTEXT = 0x11;
const ARG_TYPE_TEXT = 0x13;
public const ARG_TYPE_TEXT = 0x13;
const ARG_TYPE_JSON = 0x16;
public const ARG_TYPE_JSON = 0x16;
const ARG_TYPE_COMMAND = 0x1d;
public const ARG_TYPE_COMMAND = 0x1d;
/**
* Enums are a little different: they are composed as follows:
* ARG_FLAG_ENUM | ARG_FLAG_VALID | (enum index)
*/
const ARG_FLAG_ENUM = 0x200000;
public const ARG_FLAG_ENUM = 0x200000;
/**
* This is used for for /xp <level: int>L.
*/
const ARG_FLAG_POSTFIX = 0x1000000;
public const ARG_FLAG_POSTFIX = 0x1000000;
/**
* @var string[]

View File

@ -33,7 +33,7 @@ use pocketmine\utils\Binary;
use pocketmine\utils\BinaryStream;
class BatchPacket extends DataPacket{
const NETWORK_ID = 0xfe;
public const NETWORK_ID = 0xfe;
/** @var string */
public $payload = "";

View File

@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class BlockEntityDataPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::BLOCK_ENTITY_DATA_PACKET;
public const NETWORK_ID = ProtocolInfo::BLOCK_ENTITY_DATA_PACKET;
/** @var int */
public $x;

View File

@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class BlockEventPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::BLOCK_EVENT_PACKET;
public const NETWORK_ID = ProtocolInfo::BLOCK_EVENT_PACKET;
/** @var int */
public $x;

View File

@ -30,7 +30,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class BlockPickRequestPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::BLOCK_PICK_REQUEST_PACKET;
public const NETWORK_ID = ProtocolInfo::BLOCK_PICK_REQUEST_PACKET;
/** @var int */
public $blockX;

View File

@ -28,13 +28,13 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class BookEditPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::BOOK_EDIT_PACKET;
public const NETWORK_ID = ProtocolInfo::BOOK_EDIT_PACKET;
const TYPE_REPLACE_PAGE = 0;
const TYPE_ADD_PAGE = 1;
const TYPE_DELETE_PAGE = 2;
const TYPE_SWAP_PAGES = 3;
const TYPE_SIGN_BOOK = 4;
public const TYPE_REPLACE_PAGE = 0;
public const TYPE_ADD_PAGE = 1;
public const TYPE_DELETE_PAGE = 2;
public const TYPE_SWAP_PAGES = 3;
public const TYPE_SIGN_BOOK = 4;
/** @var int */
public $type;

View File

@ -29,24 +29,24 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class BossEventPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::BOSS_EVENT_PACKET;
public const NETWORK_ID = ProtocolInfo::BOSS_EVENT_PACKET;
/* S2C: Shows the boss-bar to the player. */
const TYPE_SHOW = 0;
public const TYPE_SHOW = 0;
/* C2S: Registers a player to a boss fight. */
const TYPE_REGISTER_PLAYER = 1;
public const TYPE_REGISTER_PLAYER = 1;
/* S2C: Removes the boss-bar from the client. */
const TYPE_HIDE = 2;
public const TYPE_HIDE = 2;
/* C2S: Unregisters a player from a boss fight. */
const TYPE_UNREGISTER_PLAYER = 3;
public const TYPE_UNREGISTER_PLAYER = 3;
/* S2C: Appears not to be implemented. Currently bar percentage only appears to change in response to the target entity's health. */
const TYPE_HEALTH_PERCENT = 4;
public const TYPE_HEALTH_PERCENT = 4;
/* S2C: Also appears to not be implemented. Title client-side sticks as the target entity's nametag, or their entity type name if not set. */
const TYPE_TITLE = 5;
public const TYPE_TITLE = 5;
/* S2C: Not sure on this. Includes color and overlay fields, plus an unknown short. TODO: check this */
const TYPE_UNKNOWN_6 = 6;
public const TYPE_UNKNOWN_6 = 6;
/* S2C: Not implemented :( Intended to alter bar appearance, but these currently produce no effect on client-side whatsoever. */
const TYPE_TEXTURE = 7;
public const TYPE_TEXTURE = 7;
/** @var int */
public $bossEid;

View File

@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class CameraPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::CAMERA_PACKET;
public const NETWORK_ID = ProtocolInfo::CAMERA_PACKET;
/** @var int */
public $cameraUniqueId;

View File

@ -30,7 +30,7 @@ use pocketmine\math\Vector3;
use pocketmine\network\mcpe\NetworkSession;
class ChangeDimensionPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::CHANGE_DIMENSION_PACKET;
public const NETWORK_ID = ProtocolInfo::CHANGE_DIMENSION_PACKET;
/** @var int */
public $dimension;

View File

@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class ChunkRadiusUpdatedPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::CHUNK_RADIUS_UPDATED_PACKET;
public const NETWORK_ID = ProtocolInfo::CHUNK_RADIUS_UPDATED_PACKET;
/** @var int */
public $radius;

View File

@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class ClientToServerHandshakePacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::CLIENT_TO_SERVER_HANDSHAKE_PACKET;
public const NETWORK_ID = ProtocolInfo::CLIENT_TO_SERVER_HANDSHAKE_PACKET;
public function canBeSentBeforeLogin() : bool{
return true;

View File

@ -32,10 +32,10 @@ use pocketmine\network\mcpe\protocol\types\DimensionIds;
use pocketmine\utils\Color;
class ClientboundMapItemDataPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::CLIENTBOUND_MAP_ITEM_DATA_PACKET;
public const NETWORK_ID = ProtocolInfo::CLIENTBOUND_MAP_ITEM_DATA_PACKET;
const BITFLAG_TEXTURE_UPDATE = 0x02;
const BITFLAG_DECORATION_UPDATE = 0x04;
public const BITFLAG_TEXTURE_UPDATE = 0x02;
public const BITFLAG_DECORATION_UPDATE = 0x04;
/** @var int */
public $mapId;

View File

@ -30,7 +30,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class CommandBlockUpdatePacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::COMMAND_BLOCK_UPDATE_PACKET;
public const NETWORK_ID = ProtocolInfo::COMMAND_BLOCK_UPDATE_PACKET;
/** @var bool */
public $isBlock;

View File

@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class CommandOutputPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::COMMAND_OUTPUT_PACKET;
public const NETWORK_ID = ProtocolInfo::COMMAND_OUTPUT_PACKET;
protected function decodePayload(){
//TODO

View File

@ -28,7 +28,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class CommandRequestPacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::COMMAND_REQUEST_PACKET;
public const NETWORK_ID = ProtocolInfo::COMMAND_REQUEST_PACKET;
/** @var string */
public $command;

View File

@ -29,7 +29,7 @@ namespace pocketmine\network\mcpe\protocol;
use pocketmine\network\mcpe\NetworkSession;
class ContainerClosePacket extends DataPacket{
const NETWORK_ID = ProtocolInfo::CONTAINER_CLOSE_PACKET;
public const NETWORK_ID = ProtocolInfo::CONTAINER_CLOSE_PACKET;
/** @var int */
public $windowId;

Some files were not shown because too many files have changed in this diff Show More