Creates item displays using Minecraft's ItemDisplay entity.
SpawnedDisplay display = DisplayAPI.item(location) .item(new ItemStack(Material.DIAMOND_SWORD)) .spawn();
.item(ItemStack item)
Sets the displayed item.
.item(new ItemStack(Material.DIAMOND_SWORD)) // Custom item with enchantment glow ItemStack sword = new ItemStack(Material.NETHERITE_SWORD); sword.addEnchantment(Enchantment.SHARPNESS, 5); .item(sword)
.item(Material material)
Shorthand for a simple item.
.item(Material.GOLDEN_APPLE)
.transform(ItemDisplayTransform transform)
Sets how the item is rendered.
Options: NONE, THIRDPERSON_LEFTHAND, THIRDPERSON_RIGHTHAND, FIRSTPERSON_LEFTHAND, FIRSTPERSON_RIGHTHAND, HEAD, GUI, GROUND, FIXED
NONE
THIRDPERSON_LEFTHAND
THIRDPERSON_RIGHTHAND
FIRSTPERSON_LEFTHAND
FIRSTPERSON_RIGHTHAND
HEAD
GUI
GROUND
FIXED
.transform(ItemDisplay.ItemDisplayTransform.GROUND) .transform(ItemDisplay.ItemDisplayTransform.GUI)
SpawnedDisplay item = DisplayAPI.item(location) .item(new ItemStack(Material.NETHER_STAR)) .billboard(Billboard.CENTER) .glow(Color.YELLOW) .spawn(); DisplayAPI.animate(item) .floating(0.3f, 40) .loop(true) .play();
See also: Common-Properties for shared builder options.
There was an error while loading. Please reload this page.