mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
pull members of WritableWorld up
This commit is contained in:
@@ -1,7 +1,30 @@
|
|||||||
package com.dfsek.terra.api.world.access;
|
package com.dfsek.terra.api.world.access;
|
||||||
|
|
||||||
import com.dfsek.terra.api.Handle;
|
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.util.vector.Vector3;
|
||||||
|
import com.dfsek.terra.api.util.vector.integer.Vector3Int;
|
||||||
|
|
||||||
|
|
||||||
public interface ReadableWorld extends World {
|
public interface ReadableWorld extends World {
|
||||||
|
BlockState getBlockData(int x, int y, int z);
|
||||||
|
|
||||||
|
default BlockState getBlockData(Vector3 position) {
|
||||||
|
return getBlockData(position.getBlockX(), position.getBlockY(), position.getBlockZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
default BlockState getBlockData(Vector3Int position) {
|
||||||
|
return getBlockData(position.getX(), position.getY(), position.getZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
BlockEntity getBlockState(int x, int y, int z);
|
||||||
|
|
||||||
|
default BlockEntity getBlockState(Vector3 position) {
|
||||||
|
return getBlockState(position.getBlockX(), position.getBlockY(), position.getBlockZ());
|
||||||
|
}
|
||||||
|
|
||||||
|
default BlockEntity getBlockState(Vector3Int position) {
|
||||||
|
return getBlockState(position.getX(), position.getY(), position.getZ());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,21 @@
|
|||||||
package com.dfsek.terra.api.world.access;
|
package com.dfsek.terra.api.world.access;
|
||||||
|
|
||||||
import com.dfsek.terra.api.Handle;
|
import com.dfsek.terra.api.Handle;
|
||||||
|
import com.dfsek.terra.api.config.WorldConfig;
|
||||||
|
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
|
||||||
|
import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator;
|
||||||
|
|
||||||
|
|
||||||
public interface World extends Handle {
|
public interface World extends Handle {
|
||||||
|
long getSeed();
|
||||||
|
|
||||||
|
int getMaxHeight();
|
||||||
|
|
||||||
|
int getMinHeight();
|
||||||
|
|
||||||
|
ChunkGenerator getGenerator();
|
||||||
|
|
||||||
|
BiomeProvider getBiomeProvider();
|
||||||
|
|
||||||
|
WorldConfig getConfig();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,32 +27,10 @@ public interface WritableWorld extends ReadableWorld {
|
|||||||
void setBlockData(int x, int y, int z, BlockState data, boolean physics);
|
void setBlockData(int x, int y, int z, BlockState data, boolean physics);
|
||||||
|
|
||||||
|
|
||||||
long getSeed();
|
|
||||||
|
|
||||||
int getMaxHeight();
|
|
||||||
|
|
||||||
BlockState getBlockData(int x, int y, int z);
|
|
||||||
|
|
||||||
BlockEntity getBlockState(int x, int y, int z);
|
|
||||||
|
|
||||||
default BlockState getBlockData(Vector3 position) {
|
|
||||||
return getBlockData(position.getBlockX(), position.getBlockY(), position.getBlockZ());
|
|
||||||
}
|
|
||||||
|
|
||||||
default BlockEntity getBlockState(Vector3 position) {
|
|
||||||
return getBlockState(position.getBlockX(), position.getBlockY(), position.getBlockZ());
|
|
||||||
}
|
|
||||||
int getMinHeight();
|
|
||||||
|
|
||||||
default Entity spawnEntity(Vector3 location, EntityType entityType) {
|
default Entity spawnEntity(Vector3 location, EntityType entityType) {
|
||||||
return spawnEntity(location.getX(), location.getY(), location.getZ(), entityType);
|
return spawnEntity(location.getX(), location.getY(), location.getZ(), entityType);
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity spawnEntity(double x, double y, double z, EntityType entityType);
|
Entity spawnEntity(double x, double y, double z, EntityType entityType);
|
||||||
|
|
||||||
ChunkGenerator getGenerator();
|
|
||||||
|
|
||||||
BiomeProvider getBiomeProvider();
|
|
||||||
|
|
||||||
WorldConfig getConfig();
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user