Search in sources :

Example 1 with QuantityBoundedItemStackConfig

use of com.skelril.nitro.registry.dynamic.QuantityBoundedItemStackConfig in project Skree by Skelril.

the class WildernessWorldWrapper method getPoolItemDrop.

private ItemStackSnapshot getPoolItemDrop(ItemStackSnapshot snapshot) {
    Map<String, QuantityBoundedItemStackConfig> replacementMapping = config.getDropAmplificationConfig().getItemReplacementMapping();
    ItemStackConfig replacementItem = replacementMapping.get(snapshot.getType().getId());
    if (replacementItem != null) {
        return ((ItemStack) (Object) replacementItem.toNSMStack()).createSnapshot();
    }
    return snapshot;
}
Also used : QuantityBoundedItemStackConfig(com.skelril.nitro.registry.dynamic.QuantityBoundedItemStackConfig) QuantityBoundedItemStackConfig(com.skelril.nitro.registry.dynamic.QuantityBoundedItemStackConfig) ItemStackConfig(com.skelril.nitro.registry.dynamic.ItemStackConfig) ItemStack(org.spongepowered.api.item.inventory.ItemStack) ItemStackFactory.newItemStack(com.skelril.nitro.item.ItemStackFactory.newItemStack)

Aggregations

ItemStackFactory.newItemStack (com.skelril.nitro.item.ItemStackFactory.newItemStack)1 ItemStackConfig (com.skelril.nitro.registry.dynamic.ItemStackConfig)1 QuantityBoundedItemStackConfig (com.skelril.nitro.registry.dynamic.QuantityBoundedItemStackConfig)1 ItemStack (org.spongepowered.api.item.inventory.ItemStack)1