use of crazypants.enderio.api.upgrades.IDarkSteelUpgrade in project EnderIO by SleepyTrousers.
the class DarkSteelRecipeManager method handleUpgrade.
private static void handleUpgrade(AnvilUpdateEvent evt, @Nonnull IDarkSteelItem item) {
for (IDarkSteelUpgrade upgrade : UpgradeRegistry.getUpgrades()) {
if (upgrade.isUpgradeItem(evt.getRight()) && upgrade.canAddToItem(evt.getLeft(), item)) {
ItemStack res = new ItemStack(evt.getLeft().getItem(), 1, evt.getLeft().getItemDamage());
final NBTTagCompound tagCompound = evt.getLeft().getTagCompound();
if (tagCompound != null) {
res.setTagCompound(tagCompound.copy());
}
upgrade.addToItem(res, item);
evt.setOutput(res);
evt.setCost(upgrade.getLevelCost());
return;
}
}
}
use of crazypants.enderio.api.upgrades.IDarkSteelUpgrade in project EnderIO by SleepyTrousers.
the class ForestryControl method registerDarkSteelUpgrades.
@SubscribeEvent
public static void registerDarkSteelUpgrades(@Nonnull RegistryEvent.Register<IDarkSteelUpgrade> event) {
final IForgeRegistry<IDarkSteelUpgrade> registry = event.getRegistry();
registry.register(new NaturalistEyeUpgrade());
registry.register(new ApiaristArmorUpgrade(EntityEquipmentSlot.FEET));
registry.register(new ApiaristArmorUpgrade(EntityEquipmentSlot.LEGS));
registry.register(new ApiaristArmorUpgrade(EntityEquipmentSlot.CHEST));
registry.register(new ApiaristArmorUpgrade(EntityEquipmentSlot.HEAD));
Log.info("Dark Steel Upgrades: Forestry integration loaded");
}
Aggregations