Enchantment: use a simple array instead of SplFixedArray

This commit is contained in:
Dylan K. Taylor 2019-08-01 16:03:08 +01:00
parent 28c9a2c0cd
commit 5c95e25326

View File

@ -95,11 +95,9 @@ class Enchantment{
public const SLOT_TRIDENT = 0x8000;
/** @var Enchantment[] */
protected static $enchantments;
protected static $enchantments = [];
public static function init() : void{
self::$enchantments = new \SplFixedArray(256);
self::register(new ProtectionEnchantment(self::PROTECTION, "%enchantment.protect.all", self::RARITY_COMMON, self::SLOT_ARMOR, self::SLOT_NONE, 4, 0.75, null));
self::register(new ProtectionEnchantment(self::FIRE_PROTECTION, "%enchantment.protect.fire", self::RARITY_UNCOMMON, self::SLOT_ARMOR, self::SLOT_NONE, 4, 1.25, [
EntityDamageEvent::CAUSE_FIRE,