diff --git a/src/test/java/org/spacehq/mc/protocol/ByteBufHelper.java b/src/test/java/org/spacehq/mc/protocol/ByteBufHelper.java index 82a19d19..e102c000 100644 --- a/src/test/java/org/spacehq/mc/protocol/ByteBufHelper.java +++ b/src/test/java/org/spacehq/mc/protocol/ByteBufHelper.java @@ -49,8 +49,8 @@ public class ByteBufHelper { } public static void assertBlock(BlockChangeRecord record, int block, int data) { - assertEquals("Received incorrect block id", block, record.getId()); - assertEquals("Received incorrect block data", data, record.getData()); + assertEquals("Received incorrect block id", block, record.getBlock().getId()); + assertEquals("Received incorrect block data", data, record.getBlock().getData()); } } diff --git a/src/test/java/org/spacehq/mc/protocol/MinecraftProtocolTest.java b/src/test/java/org/spacehq/mc/protocol/MinecraftProtocolTest.java index 6f35e1c4..3fae8ab9 100644 --- a/src/test/java/org/spacehq/mc/protocol/MinecraftProtocolTest.java +++ b/src/test/java/org/spacehq/mc/protocol/MinecraftProtocolTest.java @@ -7,6 +7,7 @@ import org.junit.Test; import org.spacehq.mc.auth.data.GameProfile; import org.spacehq.mc.protocol.data.game.entity.metadata.Position; import org.spacehq.mc.protocol.data.game.world.block.BlockChangeRecord; +import org.spacehq.mc.protocol.data.game.world.block.BlockState; import org.spacehq.mc.protocol.data.message.TextMessage; import org.spacehq.mc.protocol.data.status.PlayerInfo; import org.spacehq.mc.protocol.data.status.ServerStatusInfo; @@ -117,7 +118,7 @@ public class MinecraftProtocolTest { @Test public void testBlockBreak() throws IOException { - BlockChangeRecord record = new BlockChangeRecord(new Position(1, 61, -1), 3, 2); + BlockChangeRecord record = new BlockChangeRecord(new Position(1, 61, -1), new BlockState(3, 2)); ServerBlockChangePacket packet = writeAndRead(new ServerBlockChangePacket(record)); assertPosition(packet.getRecord().getPosition(), 1, 61, -1);