Archived
0

Block: getBlockType() -> getType()

This commit is contained in:
2018-12-25 10:27:06 +03:00
parent 3ecaa87b0a
commit 969ecdac36
3 changed files with 4 additions and 4 deletions

View File

@@ -3,6 +3,6 @@ package mc.core.world.block;
public interface Block { public interface Block {
int getLight(); int getLight();
void setLight(int light); void setLight(int light);
BlockType getBlockType(); BlockType getType();
BlockLocation getLocation(); BlockLocation getLocation();
} }

View File

@@ -171,7 +171,7 @@ public class ChunkDataPacket implements SCPacket {
for (int z = 0; z < 16; z++) { for (int z = 0; z < 16; z++) {
for (int x = 0; x < 16; x++) { for (int x = 0; x < 16; x++) {
Block block = chunkSection.getBlock(x, y, z); Block block = chunkSection.getBlock(x, y, z);
int blockState = serializeBlockState(block.getBlockType()); int blockState = serializeBlockState(block.getType());
int currentIndexPaletteBlock; int currentIndexPaletteBlock;
if (!palette.contains(blockState)) { if (!palette.contains(blockState)) {

View File

@@ -33,9 +33,9 @@ class SimpleChunkSectionTest {
for (int z = 0; z < 16; z++) { for (int z = 0; z < 16; z++) {
Block block = chunkSection.getBlock(x, y, z); Block block = chunkSection.getBlock(x, y, z);
if (y > layersBlock.size()-1) { if (y > layersBlock.size()-1) {
assertEquals(block.getBlockType(), BlockType.AIR); assertEquals(block.getType(), BlockType.AIR);
} else { } else {
assertEquals(block.getBlockType(), layersBlock.get(y)); assertEquals(block.getType(), layersBlock.get(y));
} }
} }
} }