Package pneumaticCraft.common.inventory

Examples of pneumaticCraft.common.inventory.ContainerSearcher


     */
    //private List backupContainerSlots;
    private boolean field_74234_w;

    public GuiSearcher(EntityPlayer par1EntityPlayer){
        super(new ContainerSearcher());
        par1EntityPlayer.openContainer = inventorySlots;
        allowUserInput = true;
        ySize = 176;
        parentScreen = FMLClientHandler.instance().getClient().currentScreen;
        ((ContainerSearcher)inventorySlots).init(this);
View Full Code Here


            }
        }
    }

    private void updateCreativeSearch(){
        ContainerSearcher containerSearcher = (ContainerSearcher)inventorySlots;
        containerSearcher.itemList.clear();

        Iterator iterator = Item.itemRegistry.iterator();

        while(iterator.hasNext()) {
            Item item = (Item)iterator.next();

            if(item != null && item.getCreativeTab() != null) {
                item.getSubItems(item, (CreativeTabs)null, containerSearcher.itemList);
            }
        }

        Enchantment[] aenchantment = Enchantment.enchantmentsList;
        int j = aenchantment.length;

        for(int i = 0; i < j; ++i) {
            Enchantment enchantment = aenchantment[i];

            if(enchantment != null && enchantment.type != null) {
                Items.enchanted_book.func_92113_a(enchantment, containerSearcher.itemList);
            }
        }

        iterator = containerSearcher.itemList.iterator();
        String s = searchField.getText().toLowerCase();

        while(iterator.hasNext()) {
            ItemStack itemstack = (ItemStack)iterator.next();
            boolean flag = false;
            Iterator iterator1 = itemstack.getTooltip(mc.thePlayer, mc.gameSettings.advancedItemTooltips).iterator();

            while(true) {
                if(iterator1.hasNext()) {
                    String s1 = (String)iterator1.next();

                    if(!s1.toLowerCase().contains(s)) {
                        continue;
                    }

                    flag = true;
                }

                if(!flag) {
                    iterator.remove();
                }

                break;
            }
        }

        currentScroll = 0.0F;
        containerSearcher.scrollTo(0.0F);
    }
View Full Code Here

TOP

Related Classes of pneumaticCraft.common.inventory.ContainerSearcher

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.