Search in sources :

Example 1 with ItemStackCapProvider

use of icbm.classic.prefab.item.ItemStackCapProvider in project ICBM-Classic by BuiltBrokenModding.

the class ItemMissile method initCapabilities.

@Override
@Nullable
public net.minecraftforge.common.capabilities.ICapabilityProvider initCapabilities(ItemStack stack, @Nullable NBTTagCompound nbt) {
    ItemStackCapProvider provider = new ItemStackCapProvider(stack);
    // provider.add("missile", ICBMClassicAPI.MISSILE_CAPABILITY, new CapabilityMissile()); //TODO create an itemstack version
    provider.add(NBTConstants.EXPLOSIVE, ICBMClassicAPI.EXPLOSIVE_CAPABILITY, new CapabilityExplosiveStack(stack));
    return provider;
}
Also used : CapabilityExplosiveStack(icbm.classic.lib.capability.ex.CapabilityExplosiveStack) ItemStackCapProvider(icbm.classic.prefab.item.ItemStackCapProvider) Nullable(javax.annotation.Nullable)

Example 2 with ItemStackCapProvider

use of icbm.classic.prefab.item.ItemStackCapProvider in project ICBM-Classic by BuiltBrokenModding.

the class ItemBattery method initCapabilities.

@Override
public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable NBTTagCompound nbt) {
    ItemStackCapProvider provider = new ItemStackCapProvider(stack);
    provider.add("battery", CapabilityEnergy.ENERGY, new EnergyBufferLimited(ConfigBattery.BATTERY_CAPACITY, ConfigBattery.BATTERY_INPUT_LIMIT, ConfigBattery.BATTERY_OUTPUT_LIMIT));
    return provider;
}
Also used : ItemStackCapProvider(icbm.classic.prefab.item.ItemStackCapProvider) EnergyBufferLimited(icbm.classic.lib.energy.storage.EnergyBufferLimited)

Aggregations

ItemStackCapProvider (icbm.classic.prefab.item.ItemStackCapProvider)2 CapabilityExplosiveStack (icbm.classic.lib.capability.ex.CapabilityExplosiveStack)1 EnergyBufferLimited (icbm.classic.lib.energy.storage.EnergyBufferLimited)1 Nullable (javax.annotation.Nullable)1