Commits
Doc authored and md_5 committed c6b4d5a87fa
452 452 | if (nbt != null) { |
453 453 | nmsItemStack.applyComponents(nbt); |
454 454 | } |
455 455 | |
456 456 | return CraftItemStack.asCraftMirror(nmsItemStack); |
457 457 | } catch (CommandSyntaxException ex) { |
458 458 | throw new IllegalArgumentException("Could not parse ItemStack: " + input, ex); |
459 459 | } |
460 460 | } |
461 461 | |
462 - | |
463 - | public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException { |
464 - | return ((CraftMetaItem) meta).updateMaterial(material); |
465 - | } |
466 - | |
467 462 | |
468 463 | public Material getSpawnEgg(EntityType type) { |
469 464 | if (type == EntityType.UNKNOWN) { |
470 465 | return null; |
471 466 | } |
472 467 | EntityTypes<?> nmsType = CraftEntityType.bukkitToMinecraft(type); |
473 468 | Item nmsItem = ItemMonsterEgg.byId(nmsType); |
474 469 | |
475 470 | if (nmsItem == null) { |
476 471 | return null; |