mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-15 23:26:21 +01:00
Updated Hydrazine to 1.4.2
This commit is contained in:
parent
78dd2cb005
commit
e484e4a4d6
@ -110,7 +110,7 @@ dependencies {
|
||||
annotationProcessor 'org.projectlombok:lombok:1.18.12'
|
||||
|
||||
// Path finding
|
||||
api 'com.github.MadMartian:hydrazine-path-finding:1.3.4'
|
||||
api 'com.github.MadMartian:hydrazine-path-finding:1.4.2'
|
||||
|
||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
||||
api 'com.github.jglrxavpok:Hephaistos:v1.0.5'
|
||||
|
@ -4,7 +4,10 @@ import net.minestom.server.MinecraftServer;
|
||||
import net.minestom.server.command.CommandProcessor;
|
||||
import net.minestom.server.command.CommandSender;
|
||||
import net.minestom.server.entity.Player;
|
||||
import net.minestom.server.instance.*;
|
||||
import net.minestom.server.instance.ChunkGenerator;
|
||||
import net.minestom.server.instance.ChunkPopulator;
|
||||
import net.minestom.server.instance.InstanceContainer;
|
||||
import net.minestom.server.instance.InstanceManager;
|
||||
import net.minestom.server.instance.batch.ChunkBatch;
|
||||
import net.minestom.server.world.DimensionType;
|
||||
import net.minestom.server.world.biomes.Biome;
|
||||
@ -55,8 +58,7 @@ public class SimpleCommand implements CommandProcessor {
|
||||
instanceContainer.enableAutoChunkLoad(true);
|
||||
instanceContainer.setChunkGenerator(chunkGeneratorDemo);
|
||||
|
||||
SharedInstance instance = instanceManager.createSharedInstance(instanceContainer);
|
||||
sender.asPlayer().setInstance(instance);
|
||||
sender.asPlayer().setInstance(instanceContainer);
|
||||
System.out.println(MinecraftServer.getInstanceManager().getInstances().size());
|
||||
|
||||
System.gc();
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minestom.server.entity;
|
||||
|
||||
import com.extollit.gaming.ai.path.HydrazinePathFinder;
|
||||
import com.extollit.gaming.ai.path.model.PathObject;
|
||||
import com.extollit.gaming.ai.path.model.IPath;
|
||||
import net.minestom.server.MinecraftServer;
|
||||
import net.minestom.server.attribute.Attribute;
|
||||
import net.minestom.server.entity.ai.GoalSelector;
|
||||
@ -33,7 +33,7 @@ public abstract class EntityCreature extends LivingEntity {
|
||||
|
||||
private PFPathingEntity pathingEntity = new PFPathingEntity(this);
|
||||
private HydrazinePathFinder pathFinder;
|
||||
private PathObject path;
|
||||
private IPath path;
|
||||
private Position pathPosition;
|
||||
|
||||
protected List<GoalSelector> goalSelectors = new ArrayList<>();
|
||||
|
@ -1,6 +1,8 @@
|
||||
package net.minestom.server.entity.pathfinding;
|
||||
|
||||
import com.extollit.gaming.ai.path.model.Gravitation;
|
||||
import com.extollit.gaming.ai.path.model.IPathingEntity;
|
||||
import com.extollit.gaming.ai.path.model.Passibility;
|
||||
import com.extollit.linalg.immutable.Vec3d;
|
||||
import net.minestom.server.attribute.Attribute;
|
||||
import net.minestom.server.entity.EntityCreature;
|
||||
@ -134,6 +136,16 @@ public class PFPathingEntity implements IPathingEntity {
|
||||
return swimmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean aquatic() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean avian() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean aquaphobic() {
|
||||
return aquaphobic;
|
||||
@ -152,7 +164,7 @@ public class PFPathingEntity implements IPathingEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveTo(Vec3d position) {
|
||||
public void moveTo(Vec3d position, Passibility passibility, Gravitation gravitation) {
|
||||
final float x = (float) position.x;
|
||||
final float y = (float) position.y;
|
||||
final float z = (float) position.z;
|
||||
|
Loading…
Reference in New Issue
Block a user