Package com.bergerkiller.bukkit.tc.controller.type

Examples of com.bergerkiller.bukkit.tc.controller.type.MinecartMemberFurnace


    boolean found = false;
    for (MinecartMember<?> cart : carts) {
      if (!(cart instanceof MinecartMemberFurnace)) {
        continue;
      }
      MinecartMemberFurnace member = (MinecartMemberFurnace) cart;
      if (!member.getEntity().hasFuel()) {
        found = false;
        for (Chest chest : chests) {
          Inventory inv = chest.getInventory();
          for (i = 0; i < inv.getSize(); i++) {
            org.bukkit.inventory.ItemStack item = inv.getItem(i);
            if (!LogicUtil.nullOrEmpty(item) && item.getType() == Material.COAL) {
              ItemUtil.subtractAmount(item, 1);
              inv.setItem(i, item);
              found = true;
              member.addFuelTicks(3600);
              if (TrainCarts.showTransferAnimations) {
                ItemAnimation.start(chest, member, new ItemStack(Material.COAL, 1));
              }
              break;
            }
View Full Code Here

TOP

Related Classes of com.bergerkiller.bukkit.tc.controller.type.MinecartMemberFurnace

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.