mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Burn meta wildcards from Item, allow more dynamic recipe inputs
this was an obstacle for getting rid of legacy item IDs.
This commit is contained in:
@ -72,9 +72,6 @@ final class ItemSerializer{
|
||||
* @phpstan-param \Closure(TItemType) : Data $serializer
|
||||
*/
|
||||
public function map(Item $item, \Closure $serializer) : void{
|
||||
if($item->hasAnyDamageValue()){
|
||||
throw new \InvalidArgumentException("Cannot serialize a recipe wildcard");
|
||||
}
|
||||
$index = $item->getTypeId();
|
||||
if(isset($this->itemSerializers[$index])){
|
||||
//TODO: REMOVE ME
|
||||
@ -106,9 +103,6 @@ final class ItemSerializer{
|
||||
if($item->isNull()){
|
||||
throw new \InvalidArgumentException("Cannot serialize a null itemstack");
|
||||
}
|
||||
if($item->hasAnyDamageValue()){
|
||||
throw new \InvalidArgumentException("Cannot serialize a recipe input as a saved itemstack");
|
||||
}
|
||||
if($item instanceof ItemBlock){
|
||||
$data = $this->serializeBlockItem($item->getBlock());
|
||||
}else{
|
||||
|
Reference in New Issue
Block a user