de.teamlapen.lib.lib.inventory.InventoryHelper.removeItems() - java examples

Here are the examples of the java api de.teamlapen.lib.lib.inventory.InventoryHelper.removeItems() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

19 View Complete Implementation : HunterTableContainer.java
Copyright GNU Lesser General Public License v3.0
Author : TeamLapen
/**
 * Called when the resulting item is picked up
 */
protected void onPickupResult() {
    int[] req = levelingConf.gereplacedemRequirementsForTable(hunterLevel + 1);
    InventoryHelper.removeItems(inventory, new int[] { 1, req[0], req[1], req[3] });
}

19 View Complete Implementation : AltarInfusionTileEntity.java
Copyright GNU Lesser General Public License v3.0
Author : TeamLapen
/**
 * Consume the required tileInventory
 */
private void consumeItems() {
    VampireLevelingConf.AltarInfusionRequirements requirements = VampireLevelingConf.getInstance().getAltarInfusionRequirements(targetLevel);
    InventoryHelper.removeItems(this, new int[] { requirements.blood, requirements.heart, requirements.vampireBook });
}

18 View Complete Implementation : HunterTrainerContainer.java
Copyright GNU Lesser General Public License v3.0
Author : TeamLapen
/**
 * Called via input packet, when the player clicks the levelup button.
 */
public void onLevelupClicked() {
    if (canLevelup()) {
        int old = FactionPlayerHandler.get(player).getCurrentLevel(VReference.HUNTER_FACTION);
        FactionPlayerHandler.get(player).setFactionLevel(VReference.HUNTER_FACTION, old + 1);
        int[] req = HunterLevelingConf.instance().gereplacedemRequirementsForTrainer(old + 1);
        InventoryHelper.removeItems(inventory, new int[] { req[0], req[1], 1 });
        player.addPotionEffect(new EffectInstance(ModEffects.saturation, 400, 2));
        changed = true;
    }
}