CoreNetwork / Mantle

The main plugin powering majority of features on Flatcore
1 stars 1 forks source link

Change AI nerf to include Villagers #364

Closed riddle closed 9 years ago

riddle commented 9 years ago
Animals:
  AIMaximumPlayerDistance: 32
  EnableAINerf: true

to

AINerf:
  Enable: true
  AnimalDistance: 16
  VillagerDistance: 32
matejdro commented 9 years ago
        this.goalSelector.a(0, new PathfinderGoalFloat(this));
        this.goalSelector.a(1, new PathfinderGoalAvoidTarget(this, new EntityVillagerInnerClass1(this), 8.0F, 0.6D, 0.6D));
        this.goalSelector.a(1, new PathfinderGoalTradeWithPlayer(this));
        this.goalSelector.a(1, new PathfinderGoalLookAtTradingPlayer(this));
        this.goalSelector.a(2, new PathfinderGoalMoveIndoors(this));
        this.goalSelector.a(3, new PathfinderGoalRestrictOpenDoor(this));
        this.goalSelector.a(4, new PathfinderGoalOpenDoor(this, true));
        this.goalSelector.a(5, new PathfinderGoalMoveTowardsRestriction(this, 0.6D));
        this.goalSelector.a(6, new PathfinderGoalMakeLove(this));
        this.goalSelector.a(7, new PathfinderGoalTakeFlower(this));
        this.goalSelector.a(9, new PathfinderGoalInteract(this, EntityHuman.class, 3.0F, 1.0F));
        this.goalSelector.a(9, new PathfinderGoalInteractVillagers(this));
        this.goalSelector.a(9, new PathfinderGoalRandomStroll(this, 0.6D));
        this.goalSelector.a(10, new PathfinderGoalLookAtPlayer(this, EntityInsentient.class, 8.0F));

Pick which ones you want and which ones you don't want.

riddle commented 9 years ago
        this.goalSelector.a(1, new PathfinderGoalAvoidTarget(this, new EntityVillagerInnerClass1(this), 8.0F, 0.6D, 0.6D));
        this.goalSelector.a(2, new PathfinderGoalMoveIndoors(this));
        this.goalSelector.a(5, new PathfinderGoalMoveTowardsRestriction(this, 0.6D));
        this.goalSelector.a(7, new PathfinderGoalTakeFlower(this));
        this.goalSelector.a(9, new PathfinderGoalRandomStroll(this, 0.6D));
matejdro commented 9 years ago

These are the ones you don't want or the ones that you want?

riddle commented 9 years ago

Those which should be nerfed with distance.

matejdro commented 9 years ago

Hm I just remembered, we already override villagers in TC. That means we can only do this in TC. Should I?

riddle commented 9 years ago

Yep, makes sense. We just need config nodes there and please disable the feature by default for anyone running the plugin for the first time so they’re not getting something they might not like.

matejdro commented 9 years ago

https://github.com/CoreNetwork/TradeCraft/commit/1b98e95dc59e5eff24df0c1a983934c3f92941f6

Config for this is under AILimiter node.