Package net.minecraft.entity.ai

Examples of net.minecraft.entity.ai.EntityAIBase


  private boolean attractyUsingAITask(EntityLiving ent) {
    tracking.add(ent);
    List<EntityAITaskEntry> entries = ent.tasks.taskEntries;
    boolean hasTask = false;
    EntityAIBase remove = null;
    boolean isTracked;
    for (EntityAITaskEntry entry : entries) {
      if(entry.action instanceof AttractTask) {
        AttractTask at = (AttractTask) entry.action;
        if(at.coord.equals(new BlockCoord(this)) || !at.continueExecuting()) {
View Full Code Here


        }
    }

    private void setActiveWidget(IProgWidget widget){
        boolean first = widget instanceof ProgWidgetStart;
        EntityAIBase targetAI = widget.getWidgetTargetAI(drone, widget);
        EntityAIBase ai = widget.getWidgetAI(drone, widget);
        while(targetAI == null && ai == null) {
            widget = widget.getOutputWidget();
            if(widget == null) {
                if(first) {
                    return;
View Full Code Here

    public void removeTask(EntityAIBase par1EntityAIBase){
        Iterator iterator = taskEntries.iterator();

        while(iterator.hasNext()) {
            EntityAITaskEntry entityaitaskentry = (EntityAITaskEntry)iterator.next();
            EntityAIBase entityaibase1 = entityaitaskentry.action;

            if(entityaibase1 == par1EntityAIBase) {
                if(executingTaskEntries.contains(entityaitaskentry)) {
                    entityaibase1.resetTask();
                    executingTaskEntries.remove(entityaitaskentry);
                }

                iterator.remove();
            }
View Full Code Here

            public Object[] call(IComputerAccess computer, ILuaContext context, Object[] args) throws LuaException, InterruptedException{
                if(args.length == 1) {
                    String widgetName = (String)args[0];
                    for(IProgWidget widget : TileEntityProgrammer.registeredWidgets) {
                        if(widget.getWidgetString().equals(widgetName)) {
                            EntityAIBase ai = widget.getWidgetAI(drone, getWidget());
                            if(ai == null) throw new IllegalArgumentException("The parsed action is not a runnable action! Action: \"" + widget.getWidgetString() + "\".");
                            getAI().setAction(widget, ai);
                            getTargetAI().setAction(widget, widget.getWidgetTargetAI(drone, getWidget()));
                            messageToDrone(widget.getGuiTabColor());
                            return null;
View Full Code Here

TOP

Related Classes of net.minecraft.entity.ai.EntityAIBase

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.