程序包 org.bukkit.loot
接口 Lootable
- 所有已知子接口:
AbstractCow,AbstractCubeMob,AbstractHorse,AbstractNautilus,AbstractSkeleton,AbstractVillager,AcaciaChestBoat,Ageable,Allay,Ambient,Animals,Armadillo,Axolotl,BambooChestRaft,Barrel,Bat,Bee,BirchChestBoat,Blaze,Bogged,Breedable,Breeze,BrushableBlock,Camel,CamelHusk,Cat,CaveSpider,CherryChestBoat,Chest,ChestBoat,ChestedHorse,Chicken,Cod,CopperGolem,Cow,Crafter,Creaking,Creature,Creeper,DarkOakChestBoat,Dispenser,Dolphin,Donkey,Dropper,Drowned,ElderGuardian,EnderDragon,Enderman,Endermite,Evoker,Fish,Flying,Fox,Frog,Ghast,Giant,GlowSquid,Goat,Golem,Guardian,HappyGhast,Hoglin,Hopper,HopperMinecart,Horse,Husk,Illager,Illusioner,IronGolem,JungleChestBoat,Llama,MagmaCube,MangroveChestBoat,Mob,Monster,Mule,MushroomCow,Nautilus,NPC,OakChestBoat,Ocelot,PaleOakChestBoat,Panda,Parched,Parrot,Phantom,Pig,Piglin,PiglinAbstract,PiglinBrute,PigZombie,Pillager,PolarBear,PoplarChestBoat,PufferFish,Rabbit,Raider,Ravager,Salmon,Sheep,Shulker,ShulkerBox,Silverfish,Skeleton,SkeletonHorse,Slime,Sniffer,Snowman,Spellcaster,Spider,SpruceChestBoat,Squid,Steerable,StorageMinecart,Stray,Strider,SulfurCube,SuspiciousSand,Tadpole,Tameable,TraderLlama,TropicalFish,Turtle,Vex,Villager,Vindicator,WanderingTrader,Warden,WaterMob,Witch,Wither,WitherSkeleton,Wolf,Zoglin,Zombie,ZombieHorse,ZombieNautilus,ZombieVillager
public interface Lootable
-
方法概要
修饰符和类型方法说明获取附加到此方块或实体的战利品表。longgetSeed()获取战利品表的种子。voidsetLootTable(@Nullable LootTable table) 为容器或实体设置战利品表。voidsetSeed(long seed) 设置此战利品表生成战利品时使用的种子。
-
方法详细资料
-
setLootTable
为容器或实体设置战利品表。
要移除战利品表请使用 null。原文: Set the loot table for a container or entity.
To remove a loot table use null. -
getLootTable
获取附加到此方块或实体的战利品表。
如果方块/实体没有战利品表,则返回 null,而不是空的战利品表。原文: 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.- 返回:
- 附加到此方块或实体的战利品表。
-
setSeed
void setSeed(long seed) 设置此战利品表生成战利品时使用的种子。原文: Set the seed used when this Loot Table generates loot.
- 参数:
seed- 用于生成战利品的种子。默认为 0。
-
getSeed
long getSeed()获取战利品表的种子。
种子用于生成战利品。原文: Get the Loot Table's seed.
The seed is used when generating loot.- 返回:
- 种子
-