mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-14 11:46:06 +00:00
BlockState -> BlockEntity
This commit is contained in:
@@ -4,7 +4,7 @@ import com.dfsek.terra.api.Handle;
|
||||
import com.dfsek.terra.api.block.BlockData;
|
||||
import com.dfsek.terra.api.vector.Vector3;
|
||||
|
||||
public interface BlockState extends Handle {
|
||||
public interface BlockEntity extends Handle {
|
||||
Vector3 getPosition();
|
||||
|
||||
int getX();
|
||||
@@ -2,5 +2,5 @@ package com.dfsek.terra.api.block.state;
|
||||
|
||||
import com.dfsek.terra.api.inventory.BlockInventoryHolder;
|
||||
|
||||
public interface Container extends BlockState, BlockInventoryHolder {
|
||||
public interface Container extends BlockEntity, BlockInventoryHolder {
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.dfsek.terra.api.block.state;
|
||||
import com.dfsek.terra.api.entity.EntityType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface MobSpawner extends BlockState {
|
||||
public interface MobSpawner extends BlockEntity {
|
||||
EntityType getSpawnedType();
|
||||
|
||||
void setSpawnedType(@NotNull EntityType creatureType);
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.dfsek.terra.api.block.state;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface Sign extends BlockState {
|
||||
public interface Sign extends BlockEntity {
|
||||
@NotNull String[] getLines();
|
||||
|
||||
@NotNull String getLine(int index) throws IndexOutOfBoundsException;
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.dfsek.terra.api.world;
|
||||
|
||||
import com.dfsek.terra.api.Handle;
|
||||
import com.dfsek.terra.api.block.BlockData;
|
||||
import com.dfsek.terra.api.block.state.BlockState;
|
||||
import com.dfsek.terra.api.block.state.BlockEntity;
|
||||
import com.dfsek.terra.api.entity.Entity;
|
||||
import com.dfsek.terra.api.entity.EntityType;
|
||||
import com.dfsek.terra.api.vector.Vector3;
|
||||
@@ -43,9 +43,9 @@ public interface World extends Handle {
|
||||
setBlockData(position.getBlockX(), position.getBlockY(), position.getBlockZ(), data, physics);
|
||||
}
|
||||
|
||||
BlockState getBlockState(int x, int y, int z);
|
||||
BlockEntity getBlockState(int x, int y, int z);
|
||||
|
||||
default BlockState getBlockState(Vector3 position) {
|
||||
default BlockEntity getBlockState(Vector3 position) {
|
||||
return getBlockState(position.getBlockX(), position.getBlockY(), position.getBlockZ());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user