Package org.bukkit.loot
Interface Lootable
-
- All Known Subinterfaces:
AbstractHorse,AbstractVillager,Ageable,Ambient,Animals,Barrel,Bat,Bee,Blaze,Cat,CaveSpider,Chest,ChestedHorse,Chicken,Cod,Cow,Creature,Creeper,Dispenser,Dolphin,Donkey,Dropper,Drowned,ElderGuardian,Enderman,Endermite,Evoker,Fish,Flying,Fox,Ghast,Giant,Golem,Guardian,Hopper,HopperMinecart,Horse,Husk,Illager,Illusioner,IronGolem,Llama,MagmaCube,Mob,Monster,Mule,MushroomCow,NPC,Ocelot,Panda,Parrot,Phantom,Pig,PigZombie,Pillager,PolarBear,PufferFish,Rabbit,Raider,Ravager,Salmon,Sheep,Shulker,ShulkerBox,Silverfish,Skeleton,SkeletonHorse,Slime,Snowman,Spellcaster,Spider,Squid,StorageMinecart,Stray,Tameable,TraderLlama,TropicalFish,Turtle,Vex,Villager,Vindicator,WanderingTrader,WaterMob,Witch,Wither,WitherSkeleton,Wolf,Zombie,ZombieHorse,ZombieVillager
public interface Lootable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @Nullable LootTablegetLootTable()Gets the Loot Table attached to this block or entity.longgetSeed()Get the Loot Table's seed.voidsetLootTable(@Nullable LootTable table)Set the loot table for a container or entity.voidsetSeed(long seed)Set the seed used when this Loot Table generates loot.
-
-
-
Method Detail
-
setLootTable
void setLootTable(@Nullable @Nullable LootTable table)Set the loot table for a container or entity.
To remove a loot table use null. Do not useLootTables.EMPTYto clear a LootTable.
-
getLootTable
@Nullable @Nullable LootTable getLootTable()
Gets the Loot Table attached to this block or entity.
If an block/entity does not have a loot table, this will return null, NOT an empty loot table.- Returns:
- the Loot Table attached to this block or entity.
-
setSeed
void setSeed(long seed)
Set the seed used when this Loot Table generates loot.- Parameters:
seed- the seed to used to generate loot. Default is 0.
-
getSeed
long getSeed()
Get the Loot Table's seed.
The seed is used when generating loot.- Returns:
- the seed
-
-