SPIGOT-4455: ChunkData.getType returns legacy material

This commit is contained in:
md_5 2018-10-29 07:17:59 +11:00
parent 72c3617dfe
commit f3f2fe5795
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
@Override
public Material getType(int x, int y, int z) {
return getTypeAndData(x, y, z).getItemType();
return CraftMagicNumbers.getMaterial(getTypeId(x, y, z).getBlock());
}
@Override

View File

@ -13,7 +13,7 @@ public class ChunkDataTest extends AbstractTestingBase {
private boolean testSetBlock(CraftChunkData data, int x, int y, int z, BlockData type, BlockData expected) {
data.setBlock(x, y, z, type);
return expected.equals(data.getBlockData(x, y, z));
return expected.equals(data.getBlockData(x, y, z)) && expected.getMaterial().equals(data.getType(x, y, z));
}
private void testSetRegion(CraftChunkData data, int minx, int miny, int minz, int maxx, int maxy, int maxz, BlockData type) {