Start of part registration.

This commit is contained in:
Sebastian Hartte
2020-06-08 21:27:22 +02:00
parent b2afa0398c
commit 4b11b8857b
23 changed files with 220 additions and 346 deletions
@@ -43,9 +43,10 @@ public class PartItemPredicate extends ItemPredicate
@Override
public boolean test( ItemStack item )
{
if( ItemPart.instance != null && item.getItem() == ItemPart.instance )
if( item.getItem() instanceof ItemPart )
{
return ItemPart.instance.getTypeByStack( item ) == this.partType;
ItemPart<?> itemPart = (ItemPart<?>) item.getItem();
return itemPart.getType() == partType;
}
return false;
}