mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-24 02:29:41 +00:00
Config Overhaul
This commit is contained in:
1 parent
b4cb69000e
commit
6e92f08851
51 files changed
+764
-395
No files matched your search
@@ -9,6 +9,7 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.ai.selector.NPCInteractSelector;
|
||||
import noppes.npcs.config.ConfigMain;
|
||||
import noppes.npcs.constants.AiMutex;
|
||||
import noppes.npcs.controllers.data.Line;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
@@ -84,12 +85,12 @@ public class EntityAIWander extends EntityAIBase
|
||||
if(entity.ai.walkingRange > 0){
|
||||
double distance = this.entity.getDistanceSq(this.entity.getStartXPos(), this.entity.getStartYPos(), this.entity.getStartZPos());
|
||||
int range = (int) MathHelper.sqrt_double(this.entity.ai.walkingRange * this.entity.ai.walkingRange - distance);
|
||||
if(range > CustomNpcs.NpcNavRange)
|
||||
range = CustomNpcs.NpcNavRange;
|
||||
if(range > ConfigMain.NpcNavRange)
|
||||
range = ConfigMain.NpcNavRange;
|
||||
if(range < 3){
|
||||
range = this.entity.ai.walkingRange;
|
||||
if(range > CustomNpcs.NpcNavRange)
|
||||
range = CustomNpcs.NpcNavRange;
|
||||
if(range > ConfigMain.NpcNavRange)
|
||||
range = ConfigMain.NpcNavRange;
|
||||
Vec3 start = Vec3.createVectorHelper(this.entity.getStartXPos(), this.entity.getStartYPos(), this.entity.getStartZPos());
|
||||
return RandomPositionGeneratorAlt.findRandomTargetBlockTowards(this.entity, range / 2, range / 2 > 7?7:range / 2, start);
|
||||
}
|
||||
@@ -97,7 +98,7 @@ public class EntityAIWander extends EntityAIBase
|
||||
return RandomPositionGeneratorAlt.findRandomTarget(this.entity, range, range / 2 > 7?7:range / 2);
|
||||
}
|
||||
}
|
||||
return RandomPositionGeneratorAlt.findRandomTarget(this.entity, CustomNpcs.NpcNavRange, 7);
|
||||
return RandomPositionGeneratorAlt.findRandomTarget(this.entity, ConfigMain.NpcNavRange, 7);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user