data.setDimension(width, height, players); data.setPlayerStart((byte) player, x, y); for (int y = 0; y < height; y++) { byte type = stream.readByte(); data.setLandscape(x, y, types[type]); for (int y = 0; y < height; y++) { byte h = stream.readByte(); data.setHeight(x, y, h); byte t = stream.readByte(); byte amount = stream.readByte(); data.setResources(x, y, EResourceType.VALUES[t], amount); data.setBlockedPartition(x, y, stream.readShort()); MapDataObject object = getObject(type, string); if (object != null) { data.setMapObject(x, y, object);