@Override public boolean isBlackListed( final ItemStack cellItem, final IAEItemStack requestedAddition ) { if( requestedAddition != null ) { final int[] id = OreDictionary.getOreIDs( requestedAddition.getDefinition() ); for( final int x : id ) { if( ORE_TO_COLOR.containsKey( x ) ) { return false; } } if( requestedAddition.getItem() instanceof ItemSnowball ) { return false; } return !( requestedAddition.getItem() instanceof ItemPaintBall && requestedAddition.getItemDamage() < 20 ); } return true; }
public CraftBranchFailure( final IAEItemStack what, final long howMany ) { super( "Failed: " + what.getItem().getUnlocalizedName() + " x " + howMany ); this.missing = what.copy(); this.missing.setStackSize( howMany ); } }
@Override public boolean isBlackListed( final ItemStack cellItem, final IAEItemStack requestedAddition ) { final float pen = AEApi.instance().registries().matterCannon().getPenetration( requestedAddition.createItemStack() ); if( pen > 0 ) { return false; } if( requestedAddition.getItem() instanceof ItemPaintBall ) { return false; } return true; }
@Override public ImmutableCollection<ICraftingPatternDetails> getCraftingFor( final IAEItemStack whatToCraft, final ICraftingPatternDetails details, final int slotIndex, final World world ) { final ImmutableList<ICraftingPatternDetails> res = this.craftableItems.get( whatToCraft ); if( res == null ) { if( details != null && details.isCraftable() ) { for( final IAEItemStack ais : this.craftableItems.keySet() ) { if( ais.getItem() == whatToCraft.getItem() && ( !ais.getItem().getHasSubtypes() || ais.getItemDamage() == whatToCraft.getItemDamage() ) ) { // TODO: check if OK // TODO: this is slightly hacky, but fine as long as we only deal with itemstacks if( details.isValidItemForSlot( slotIndex, ais.asItemStackRepresentation(), world ) ) { return this.craftableItems.get( ais ); } } } } return ImmutableSet.of(); } return res; }
IAEItemStack getAmountCrafted( IAEItemStack what2 ) { for( final IAEItemStack is : this.details.getCondensedOutputs() ) { if( is.equals( what2 ) ) { what2 = what2.copy(); what2.setStackSize( is.getStackSize() ); return what2; } } // more fuzzy! for( final IAEItemStack is : this.details.getCondensedOutputs() ) { if( is.getItem() == what2.getItem() && ( is.getItem().isDamageable() || is.getItemDamage() == what2.getItemDamage() ) ) { what2 = is.copy(); what2.setStackSize( is.getStackSize() ); return what2; } } throw new IllegalStateException( "Crafting Tree construction failed." ); }
ResourceLocation identifier = s.getItem().getRegistryName();
continue; if (fluidStack.getItem() == ItemEnum.FLUIDPATTERN.getItem()) { this.toExport = fluidStack.copy(); continue;
continue; if (s.getItem() == ItemEnum.FLUIDPATTERN.getItem()) { this.toExport = s.copy(); continue;