mirror of
https://github.com/Minestom/Minestom.git
synced 2024-06-26 06:24:54 +02:00
Fix pathfinding + cleanup
This commit is contained in:
parent
a0d5ac12bc
commit
e8e8022ec6
|
@ -845,7 +845,9 @@ public class Entity implements Viewable, EventHandler, DataContainer, Permission
|
|||
* @param instance the new instance of the entity
|
||||
* @throws NullPointerException if {@code instance} is null
|
||||
* @throws IllegalStateException if {@code instance} has not been registered in {@link InstanceManager}
|
||||
* @deprecated Use {@link Entity#setInstance(Instance, Position)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void setInstance(@NotNull Instance instance) {
|
||||
setInstance(instance, this.position);
|
||||
}
|
||||
|
|
|
@ -69,15 +69,10 @@ public class EntityCreature extends LivingEntity implements NavigableEntity, Ent
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setInstance(@NotNull Instance instance) {
|
||||
public void setInstance(@NotNull Instance instance, @NotNull Position spawnPosition) {
|
||||
this.navigator.setPathFinder(new HydrazinePathFinder(navigator.getPathingEntity(), instance.getInstanceSpace()));
|
||||
|
||||
super.setInstance(instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawn() {
|
||||
|
||||
super.setInstance(instance, spawnPosition);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -26,7 +26,6 @@ import net.minestom.server.utils.block.BlockIterator;
|
|||
import net.minestom.server.utils.time.CooldownUtils;
|
||||
import net.minestom.server.utils.time.TimeUnit;
|
||||
import net.minestom.server.utils.time.UpdateOption;
|
||||
import net.minestom.server.utils.validate.Check;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -250,11 +249,6 @@ public class LivingEntity extends Entity implements EquipmentHandler {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void spawn() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the amount of arrows in the entity.
|
||||
*
|
||||
|
|
|
@ -102,9 +102,7 @@ public class Metadata {
|
|||
}
|
||||
|
||||
public static Value<NBT> NBT(@NotNull NBT nbt) {
|
||||
return new Value<>(TYPE_NBT, nbt, writer -> {
|
||||
writer.writeNBT("", nbt);
|
||||
});
|
||||
return new Value<>(TYPE_NBT, nbt, writer -> writer.writeNBT("", nbt));
|
||||
}
|
||||
|
||||
public static Value<int[]> VillagerData(int villagerType,
|
||||
|
|
Loading…
Reference in New Issue
Block a user