Search in sources :

Example 1 with LanternHeldEquipmentType

use of org.lanternpowered.server.inventory.equipment.LanternHeldEquipmentType in project LanternServer by LanternPowered.

the class EquipmentTypeRegistryModule method registerDefaults.

@Override
public void registerDefaults() {
    register(new LanternEquipmentType("minecraft", "all", type -> true));
    register(new LanternEquipmentType("minecraft", "equipped", type -> type instanceof LanternHeldEquipmentType || type instanceof LanternWornEquipmentType));
    register(new LanternHeldEquipmentType("minecraft", "held", type -> type instanceof LanternHeldEquipmentType));
    register(new LanternHeldEquipmentType("minecraft", "main_hand"));
    register(new LanternHeldEquipmentType("minecraft", "off_hand"));
    register(new LanternWornEquipmentType("minecraft", "worn", type -> type instanceof LanternWornEquipmentType));
    register(new LanternWornEquipmentType("minecraft", "boots"));
    register(new LanternWornEquipmentType("minecraft", "chestplate"));
    register(new LanternWornEquipmentType("minecraft", "headwear"));
    register(new LanternWornEquipmentType("minecraft", "leggings"));
}
Also used : LanternEquipmentType(org.lanternpowered.server.inventory.equipment.LanternEquipmentType) LanternWornEquipmentType(org.lanternpowered.server.inventory.equipment.LanternWornEquipmentType) EquipmentType(org.spongepowered.api.item.inventory.equipment.EquipmentType) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) LanternHeldEquipmentType(org.lanternpowered.server.inventory.equipment.LanternHeldEquipmentType) HandTypes(org.spongepowered.api.data.type.HandTypes) HandType(org.spongepowered.api.data.type.HandType) EquipmentTypes(org.spongepowered.api.item.inventory.equipment.EquipmentTypes) AdditionalPluginCatalogRegistryModule(org.lanternpowered.server.game.registry.AdditionalPluginCatalogRegistryModule) LanternEquipmentType(org.lanternpowered.server.inventory.equipment.LanternEquipmentType) LanternHeldEquipmentType(org.lanternpowered.server.inventory.equipment.LanternHeldEquipmentType) LanternWornEquipmentType(org.lanternpowered.server.inventory.equipment.LanternWornEquipmentType)

Aggregations

Preconditions.checkNotNull (com.google.common.base.Preconditions.checkNotNull)1 AdditionalPluginCatalogRegistryModule (org.lanternpowered.server.game.registry.AdditionalPluginCatalogRegistryModule)1 LanternEquipmentType (org.lanternpowered.server.inventory.equipment.LanternEquipmentType)1 LanternHeldEquipmentType (org.lanternpowered.server.inventory.equipment.LanternHeldEquipmentType)1 LanternWornEquipmentType (org.lanternpowered.server.inventory.equipment.LanternWornEquipmentType)1 HandType (org.spongepowered.api.data.type.HandType)1 HandTypes (org.spongepowered.api.data.type.HandTypes)1 EquipmentType (org.spongepowered.api.item.inventory.equipment.EquipmentType)1 EquipmentTypes (org.spongepowered.api.item.inventory.equipment.EquipmentTypes)1