mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-22 00:00:40 +00:00
move spawnEntity to WorldAccess
This commit is contained in:
@@ -17,9 +17,6 @@ import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator;
|
||||
|
||||
|
||||
public interface World extends WorldAccess {
|
||||
Entity spawnEntity(Vector3 location, EntityType entityType);
|
||||
|
||||
|
||||
Chunk getChunkAt(int x, int z);
|
||||
|
||||
default Chunk getChunkAt(Vector3 location) {
|
||||
|
||||
@@ -3,6 +3,8 @@ package com.dfsek.terra.api.world.access;
|
||||
import com.dfsek.terra.api.Handle;
|
||||
import com.dfsek.terra.api.block.entity.BlockEntity;
|
||||
import com.dfsek.terra.api.block.state.BlockState;
|
||||
import com.dfsek.terra.api.entity.Entity;
|
||||
import com.dfsek.terra.api.entity.EntityType;
|
||||
import com.dfsek.terra.api.util.vector.Vector3;
|
||||
|
||||
|
||||
@@ -38,4 +40,10 @@ public interface WorldAccess extends Handle {
|
||||
return getBlockState(position.getBlockX(), position.getBlockY(), position.getBlockZ());
|
||||
}
|
||||
int getMinHeight();
|
||||
|
||||
default Entity spawnEntity(Vector3 location, EntityType entityType) {
|
||||
return spawnEntity(location.getX(), location.getY(), location.getZ(), entityType);
|
||||
}
|
||||
|
||||
Entity spawnEntity(double x, double y, double z, EntityType entityType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user