EnchantmentIdMap
in package
Uses
SingletonTrait
Handles translation of internal enchantment types to and from Minecraft: Bedrock IDs.
Table of Contents
- $enchToId : array<string|int, int>
- $idToEnch : array<string|int, Enchantment>
- $instance : self|null
- fromId() : Enchantment|null
- getInstance() : self
- register() : void
- reset() : void
- setInstance() : void
- toId() : int
- __construct() : mixed
- make() : self
Properties
$enchToId
private
array<string|int, int>
$enchToId
= []
Tags
$idToEnch
private
array<string|int, Enchantment>
$idToEnch
= []
Tags
$instance
private
static self|null
$instance
= null
Methods
fromId()
public
fromId(int $id) : Enchantment|null
Parameters
- $id : int
Return values
Enchantment|null —getInstance()
public
static getInstance() : self
Return values
self —register()
public
register(int $mcpeId, Enchantment $enchantment) : void
Parameters
- $mcpeId : int
- $enchantment : Enchantment
Return values
void —reset()
public
static reset() : void
Return values
void —setInstance()
public
static setInstance(self $instance) : void
Parameters
- $instance : self
Return values
void —toId()
public
toId(Enchantment $enchantment) : int
Parameters
- $enchantment : Enchantment
Return values
int —__construct()
private
__construct() : mixed
Return values
mixed —make()
private
static make() : self