Use constants for compound meta values

This commit is contained in:
Dylan K. Taylor 2022-03-23 15:58:27 +00:00
parent a9f2766a8b
commit f25beab6cb
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 104 additions and 38 deletions

View File

@ -0,0 +1,65 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\data\bedrock;
final class CompoundTypeIds{
public const SALT = 0;
public const SODIUM_OXIDE = 1;
public const SODIUM_HYDROXIDE = 2;
public const MAGNESIUM_NITRATE = 3;
public const IRON_SULPHIDE = 4;
public const LITHIUM_HYDRIDE = 5;
public const SODIUM_HYDRIDE = 6;
public const CALCIUM_BROMIDE = 7;
public const MAGNESIUM_OXIDE = 8;
public const SODIUM_ACETATE = 9;
public const LUMINOL = 10;
public const CHARCOAL = 11;
public const SUGAR = 12;
public const ALUMINIUM_OXIDE = 13;
public const BORON_TRIOXIDE = 14;
public const SOAP = 15;
public const POLYETHYLENE = 16;
public const RUBBISH = 17;
public const MAGNESIUM_SALTS = 18;
public const SULPHATE = 19;
public const BARIUM_SULPHATE = 20;
public const POTASSIUM_CHLORIDE = 21;
public const MERCURIC_CHLORIDE = 22;
public const CERIUM_CHLORIDE = 23;
public const TUNGSTEN_CHLORIDE = 24;
public const CALCIUM_CHLORIDE = 25;
public const WATER = 26;
public const GLUE = 27;
public const HYPOCHLORITE = 28;
public const CRUDE_OIL = 29;
public const LATEX = 30;
public const POTASSIUM_IODIDE = 31;
public const SODIUM_FLUORIDE = 32;
public const BENZENE = 33;
public const INK = 34;
public const HYDROGEN_PEROXIDE = 35;
public const AMMONIA = 36;
public const SODIUM_HYPOCHLORITE = 37;
}

View File

@ -31,6 +31,7 @@ use pocketmine\block\utils\RecordType;
use pocketmine\block\utils\SkullType;
use pocketmine\block\utils\TreeType;
use pocketmine\block\VanillaBlocks;
use pocketmine\data\bedrock\CompoundTypeIds;
use pocketmine\data\bedrock\DyeColorIdMap;
use pocketmine\data\bedrock\EntityLegacyIds;
use pocketmine\data\bedrock\PotionTypeIdMap;
@ -112,44 +113,44 @@ class ItemFactory{
$this->register(new Item(new ItemIdentifier(ItemIds::BRICK, 0), "Brick"));
$this->register(new Item(new ItemIdentifier(ItemIds::CHORUS_FRUIT_POPPED, 0), "Popped Chorus Fruit"));
$this->register(new Item(new ItemIdentifier(ItemIds::CLAY_BALL, 0), "Clay"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 0), "Salt"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 1), "Sodium Oxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 2), "Sodium Hydroxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 3), "Magnesium Nitrate"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 4), "Iron Sulphide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 5), "Lithium Hydride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 6), "Sodium Hydride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 7), "Calcium Bromide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 8), "Magnesium Oxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 9), "Sodium Acetate"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 10), "Luminol"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 11), "Charcoal")); //??? maybe bug
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 12), "Sugar")); //??? maybe bug
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 13), "Aluminium Oxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 14), "Boron Trioxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 15), "Soap"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 16), "Polyethylene"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 17), "Rubbish"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 18), "Magnesium Salts"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 19), "Sulphate"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 20), "Barium Sulphate"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 21), "Potassium Chloride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 22), "Mercuric Chloride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 23), "Cerium Chloride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 24), "Tungsten Chloride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 25), "Calcium Chloride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 26), "Water")); //???
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 27), "Glue"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 28), "Hypochlorite"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 29), "Crude Oil"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 30), "Latex"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 31), "Potassium Iodide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 32), "Sodium Fluoride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 33), "Benzene"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 34), "Ink"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 35), "Hydrogen Peroxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 36), "Ammonia"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, 37), "Sodium Hypochlorite"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::SALT), "Salt"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::SODIUM_OXIDE), "Sodium Oxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::SODIUM_HYDROXIDE), "Sodium Hydroxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::MAGNESIUM_NITRATE), "Magnesium Nitrate"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::IRON_SULPHIDE), "Iron Sulphide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::LITHIUM_HYDRIDE), "Lithium Hydride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::SODIUM_HYDRIDE), "Sodium Hydride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::CALCIUM_BROMIDE), "Calcium Bromide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::MAGNESIUM_OXIDE), "Magnesium Oxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::SODIUM_ACETATE), "Sodium Acetate"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::LUMINOL), "Luminol"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::CHARCOAL), "Charcoal")); //??? maybe bug
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::SUGAR), "Sugar")); //??? maybe bug
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::ALUMINIUM_OXIDE), "Aluminium Oxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::BORON_TRIOXIDE), "Boron Trioxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::SOAP), "Soap"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::POLYETHYLENE), "Polyethylene"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::RUBBISH), "Rubbish"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::MAGNESIUM_SALTS), "Magnesium Salts"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::SULPHATE), "Sulphate"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::BARIUM_SULPHATE), "Barium Sulphate"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::POTASSIUM_CHLORIDE), "Potassium Chloride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::MERCURIC_CHLORIDE), "Mercuric Chloride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::CERIUM_CHLORIDE), "Cerium Chloride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::TUNGSTEN_CHLORIDE), "Tungsten Chloride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::CALCIUM_CHLORIDE), "Calcium Chloride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::WATER), "Water")); //???
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::GLUE), "Glue"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::HYPOCHLORITE), "Hypochlorite"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::CRUDE_OIL), "Crude Oil"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::LATEX), "Latex"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::POTASSIUM_IODIDE), "Potassium Iodide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::SODIUM_FLUORIDE), "Sodium Fluoride"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::BENZENE), "Benzene"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::INK), "Ink"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::HYDROGEN_PEROXIDE), "Hydrogen Peroxide"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::AMMONIA), "Ammonia"));
$this->register(new Item(new ItemIdentifier(ItemIds::COMPOUND, CompoundTypeIds::SODIUM_HYPOCHLORITE), "Sodium Hypochlorite"));
$this->register(new Item(new ItemIdentifier(ItemIds::DIAMOND, 0), "Diamond"));
$this->register(new Item(new ItemIdentifier(ItemIds::DRAGON_BREATH, 0), "Dragon's Breath"));
$this->register(new Item(new ItemIdentifier(ItemIds::DYE, 0), "Ink Sac"));