Package pneumaticCraft.common

Examples of pneumaticCraft.common.EventHandlerPneumaticCraft


        proxy.registerRenders();
        proxy.registerHandlers();
        tickHandler = new TickHandlerPneumaticCraft();
        FMLCommonHandler.instance().bus().register(tickHandler);
        MinecraftForge.EVENT_BUS.register(new EventHandlerPneumaticCraft());
        MinecraftForge.EVENT_BUS.register(new EventHandlerUniversalSensor());

        FMLCommonHandler.instance().bus().register(new CraftingHandler());
        FMLCommonHandler.instance().bus().register(new Config());
    }
View Full Code Here


    public boolean continueExecuting(){
        if(curPickingUpEntity.isDead) return false;
        if(curPickingUpEntity.getDistanceToEntity(drone) < 1.5) {
            ItemStack stack = curPickingUpEntity.getEntityItem();
            if(itemPickupWidget.isItemValidForFilters(stack)) {
                new EventHandlerPneumaticCraft().onPlayerPickup(new EntityItemPickupEvent(drone.getFakePlayer(), curPickingUpEntity));//not posting the event globally, as I don't have a way of handling a canceled event.
                int stackSize = stack.stackSize;
                ItemStack remainder = PneumaticCraftUtils.exportStackToInventory(drone.getInventory(), stack, ForgeDirection.UP);//side doesn't matter, drones aren't ISided.
                if(remainder == null) {
                    drone.onItemPickup(curPickingUpEntity, stackSize);
                    curPickingUpEntity.setDead();
View Full Code Here

TOP

Related Classes of pneumaticCraft.common.EventHandlerPneumaticCraft

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.