Examples of canDye()


Examples of net.mcft.copy.betterstorage.item.IDyeableItem.canDye()

    for (int i = 0; i < crafting.getSizeInventory(); i++) {
      ItemStack stack = crafting.getStackInSlot(i);
      if (stack == null) continue;
      IDyeableItem dyeable = ((stack.getItem() instanceof IDyeableItem)
          ? (IDyeableItem)stack.getItem() : null);
      if ((dyeable != null) && dyeable.canDye(stack)) {
        if (hasArmor) return false;
        hasArmor = true;
      } else if (DyeUtils.isDye(stack)) hasDyes = true;
      else return false;
    }
View Full Code Here

Examples of net.mcft.copy.betterstorage.item.IDyeableItem.canDye()

    for (int i = 0; i < crafting.getSizeInventory(); i++) {
      ItemStack stack = crafting.getStackInSlot(i);
      if (stack == null) continue;
      dyeable = ((stack.getItem() instanceof IDyeableItem)
          ? (IDyeableItem)stack.getItem() : null);
      if ((dyeable != null) && dyeable.canDye(stack)) {
        if (armor != null) return null;
        armor = stack.copy();
      } else if (DyeUtils.isDye(stack)) dyes.add(stack);
      else return null;
    }
View Full Code Here

Examples of net.mcft.copy.betterstorage.item.IDyeableItem.canDye()

    if (rightClick && (block == Blocks.cauldron)) {
      int metadata = world.getBlockMetadata(x, y, z);
      if (metadata > 0) {
        IDyeableItem dyeable = (((holding != null) && (holding.getItem() instanceof IDyeableItem))
            ? (IDyeableItem)holding.getItem() : null);
        if ((dyeable != null) && (dyeable.canDye(holding))) {
          StackUtils.remove(holding, "display", "color");
          world.setBlockMetadataWithNotify(x, y, z, metadata - 1, 2);
          world.func_147453_f(x, y, z, block);
         
          event.useBlock = Result.DENY;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.