mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-08 16:56:07 +00:00
add ProtoWorld#getWorld
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.dfsek.terra.api.world.chunk.generation;
|
||||
|
||||
import com.dfsek.terra.api.world.access.World;
|
||||
import com.dfsek.terra.api.world.access.WorldAccess;
|
||||
|
||||
|
||||
@@ -7,4 +8,12 @@ public interface ProtoWorld extends WorldAccess {
|
||||
int centerChunkX();
|
||||
|
||||
int centerChunkZ();
|
||||
|
||||
/**
|
||||
* Get the world object this ProtoWorld represents
|
||||
*
|
||||
* <b>Do not read from/write to this world!</b>
|
||||
* @return The world
|
||||
*/
|
||||
World getWorld();
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ 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;
|
||||
import com.dfsek.terra.api.world.access.World;
|
||||
import com.dfsek.terra.api.world.chunk.generation.ProtoWorld;
|
||||
|
||||
import com.dfsek.terra.bukkit.BukkitEntity;
|
||||
@@ -77,4 +78,9 @@ public class BukkitProtoWorld implements ProtoWorld {
|
||||
public int centerChunkZ() {
|
||||
return delegate.getCenterChunkZ();
|
||||
}
|
||||
|
||||
@Override
|
||||
public World getWorld() {
|
||||
return new BukkitWorld(delegate.getWorld());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user